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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric 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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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

Top Solution Authors