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
FilipK
Resolver I
Resolver I

Update strategy to reduce refresh times in PBI Desktop

The last days I figured out some issues regarding refresh times in PBI Desktop.

 

Situation

  • PBI Desktop with SQL DB as data source
  • One table gets data from an SQL view that calculation costs 30 minutes
  • The view unfortunately cannot be easily optimized to be faster (not in my hands

What happened

  • A column in the view was added
  • To prepare the refresh you need to go to Transform data, select the table in query editor and in the navigation pane of the applied steps I clicked on Navigation and then refresh preview in order to get the new column updated in my local data model  

FilipK_0-1620709158557.png

  • With that preview a sql query Top 1000 .... was called but due to my non optimal view it still took 30 minutes.

Beside optimizing the view, what are possible workarounds to reduce time for such adaptions? I mean I was pretty sure how to filter that new column with the advanced editor, so preview was not really necessary for me. 

 

1 ACCEPTED SOLUTION

Hi, @FilipK 

 

Existing features don't help the previewed data. Since you just want to speed up the preview, you can use this method to filter the data first, and then when it is loaded into the PQ, you can still modify the sql statement in the Advanced Editor. It should be noted that if the refresh speed is always slow, it is likely that the performance of the source data is too poor.

 

Best Regards

Janey Guo

 

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

6 REPLIES 6
v-janeyg-msft
Community Support
Community Support

Hi, @FilipK 

 

 

Have you tried to use sql statement to filter part of the data from the beginning of connecting to the data source? Maybe it will help.

v-janeyg-msft_0-1620874433789.png

If it doesn’t solve your problem, please feel free to ask me.

 

Best Regards

Janey Guo

 

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

Hi @v-janeyg-msft ,

 

you mean using a e.g. a where clause that makes the query itself very fast, don't you?

I think that will work to speed up the preview, right. But still before pushing the report to my PBI workspace I need to remove the sql statement again, since I need the whole dataset. So it will ask again for refresh time. 

Hi,  @FilipK 

 

I found a feature to turn off preview directly, but it may cause the refresh frequency to increase. If you don’t mind closing it directly.

v-janeyg-msft_0-1621237212274.png

Reference: Disable Power Query background refresh - Power BI | Microsoft Docs

 

Best Regards

Janey Guo

 

Hi, @FilipK 

 

Existing features don't help the previewed data. Since you just want to speed up the preview, you can use this method to filter the data first, and then when it is loaded into the PQ, you can still modify the sql statement in the Advanced Editor. It should be noted that if the refresh speed is always slow, it is likely that the performance of the source data is too poor.

 

Best Regards

Janey Guo

 

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

amitchandak
Super User
Super User

@FilipK , If the top 1000 from view is taking 30 Mins, I really doubt the view is optimized for that. explore the option to work tables.

Another option is to pass some date filters or another filter that is better optimized on view.

@amitchandak , thanks for your prompt answer. 

You're right, but do I have any chance to change the way PBI is querring the refresh? Before the top1000 step is performed the view is created which costs the time. That is the problem.

 

select top 1000      [$Table].[epoch_time] as [epoch_time],      [$Table].[msgtime_datetime2] as [msgtime_datetime2],      [$Table].[ans] as [ans],      ...]  from [dbo].[View_TD2] as [$Table]

 

 

You proposed using some other date filters. But to what I understood, there is no way to influence how the preview query looks like. 

As you see in my picture above I created a filter for incremental refresh. With that I'm super happy. In PBI Desktop I can change RangeStart and RangeEnd so the query costs 10 seconds. But for refresh I don't see the solution.

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.