Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Scheduled refresh is running queries twice

Hi all,

we have scheduled refresh that is pretty big and has a lot of temp tables, it's running daily and every query it contais is ran twice - both start within few seconds.


The queries take double the time to load - spending our database resources and we had to postpone all other processes since it takes around 90 minutes to load - instead of 45 min.


Database is Amazon Redshift and we're using ODBC connector, source is written in custom SQL.

I saw some older posts, I'm wondering if anyone has found a workaround for this issue?


Thank you!

1 ACCEPTED SOLUTION
v-chenwuz-msft
Community Support
Community Support

Hi @Anonymous 

 

I was searching and found some results about your refreshing twice, you can refer to them.

why Power BI query twice 

Power BI wants to know the schema of the table before the query actually runs, so it asks Power Query to return the top 0 rows. Unfortunately, in this case query folding cant take place and the top 0 filter cant be pushed back to the database, so the entire query gets run once to get the schema and once to get the data.

Maybe you can try the solution this blog has mentionedis using the Table.View M function to hard-code the schema returned by the query and implement query folding manually.

 

Best Regards

Community Support Team _ chenwu zhu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-chenwuz-msft
Community Support
Community Support

Hi @Anonymous 

 

I was searching and found some results about your refreshing twice, you can refer to them.

why Power BI query twice 

Power BI wants to know the schema of the table before the query actually runs, so it asks Power Query to return the top 0 rows. Unfortunately, in this case query folding cant take place and the top 0 filter cant be pushed back to the database, so the entire query gets run once to get the schema and once to get the data.

Maybe you can try the solution this blog has mentionedis using the Table.View M function to hard-code the schema returned by the query and implement query folding manually.

 

Best Regards

Community Support Team _ chenwu zhu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hi Stefano,
I'm not using dataflows yet - I've have dataset and report 1:1 connection, dataset is connected to database through gateway.

Lineage:

v_street_0-1633346965941.png

 

We have full refresh every day, scheduled from Dataset settings -> Scheduled Refresh.

 

Thanks!

 

 

StefanoGrimaldi
Resident Rockstar
Resident Rockstar

by any chance you using dataflows connect to a data model dataset? can you share some more details on how the linages its set up and your refreshing configurations set up too. 





Did I answer your question? Mark my post as a solution! / Did it help? Give some Kudos!

Proud to be a Super User!




Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors