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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Data refresh slower over time SQL server

Hi all!

 

I am experiencing a bit of a weird issue, and I wonder if others have run into it. I have a dataset of about 1.4M rows on an SQL server DB.

 

My powerquery merges this data with another set of similar size, left joining the two to create my table.

 

Now When the refresh starts at first, it will be nice and fast, about 15K rows per second, I think. But as time progresses, and we get to around 1.15M of 1.4M rows, it slows down....and slower..and slower, until there is only about 400 rows per second being ingested.

 

Does anyone have an idea why this is happening? Does it have to do with my merge? Or could there be something else at play?

 

Thanks!

Jaap

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hey Parry!

 

The reason I'm using merge instead of a relation, is that I do not want all data from the second table in my model. (And the first table determines what I need from the second) The second table is very big, and I only need a small part of the data. I don't want my file size to explode :). Unfortunately this is not a transactional system that I can just apply a star schema to 😞

 

Anyway, I checked, and the query folding broke after a "change type" step. I moved that "change type" to the end, and now the folding survives the merge. It does have an effect on the loading though. It now starts out slow, and then suddenly becomes very fast at the end. By patiently staring at my screen for theduration of the refresh, I found that it sped up right after running out of rows to merge with. So the speed difference is caused by the merge. The part where it has things to merge will be slow, the part where it does not (where the left join joins with nothing) will be fast.

 

It still seems faster and more space efficient to merge here than to use a relationship, very counter-intuitive....

 

Thanks anyway, your mention of the query folding did help me through the process 🙂

 

Jaap

 

 

 

 

View solution in original post

3 REPLIES 3
parry2k
Super User
Super User

@Anonymous why you are doing merge? I found the merge is expensive? Although in this case I guess query folding is happening. Try to avoid merge and then check. You can always load both the tables and set the relationship (better approach) rather than merging.

 

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Hey Parry!

 

The reason I'm using merge instead of a relation, is that I do not want all data from the second table in my model. (And the first table determines what I need from the second) The second table is very big, and I only need a small part of the data. I don't want my file size to explode :). Unfortunately this is not a transactional system that I can just apply a star schema to 😞

 

Anyway, I checked, and the query folding broke after a "change type" step. I moved that "change type" to the end, and now the folding survives the merge. It does have an effect on the loading though. It now starts out slow, and then suddenly becomes very fast at the end. By patiently staring at my screen for theduration of the refresh, I found that it sped up right after running out of rows to merge with. So the speed difference is caused by the merge. The part where it has things to merge will be slow, the part where it does not (where the left join joins with nothing) will be fast.

 

It still seems faster and more space efficient to merge here than to use a relationship, very counter-intuitive....

 

Thanks anyway, your mention of the query folding did help me through the process 🙂

 

Jaap

 

 

 

 

@Anonymous yes there always many parts to everything, glad it improved, yes, one should seriously pay attention to query steps and take advantage of query folding where possible. Good luck! and I hope you are good for now.

 

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.