Skip to main content

Power BI

New

Stop Executing Queries Multiple Times

Vote (115) Share
's profile image

on 01 Feb 2019 23:43:45

I create a query in Power BI Desktop against a data source. Power BI Desktop insists on executing it multiple (usually three) times. This makes Desktop slow and for back-end data sources exerts additional load that can also incur additional costs.

Note: I am not talking about the scenario where a query is referred to multiple times in M, rather just a simple query loaded into one table in the data model. I assume the engine is checking data types, etc - but the current approach is very slow/painful. Optimisation is needed!

Comments (15)
's profile image Profile Picture

1f3aa058 1554-40b2-bf34-7db988be8f16 on 10 Jul 2020 17:20:40

RE: Stop Executing Queries Multiple Times

This is unacceptable, running queries multiple times is degradding our server performance.
MS should fix this MAJOR ISSUE.

's profile image Profile Picture

4b96143d f50c-46c5-806b-598cc1c7bf12 on 06 Jul 2020 00:16:10

RE: Stop Executing Queries Multiple Times

How is this not addressed yet. We are facing lot of performance issues querying Hive with billions of rows. The power bi file has typically multiple tables used and each of the table executes 3 queries internally.

's profile image Profile Picture

2569e98f e9ec-440c-9fb9-ddae29f102a9 on 06 Jul 2020 00:12:46

RE: Stop Executing Queries Multiple Times

How is this still not resolved?

's profile image Profile Picture

de6d752f 0523-494f-9fc4-15be87f1dd51 on 06 Jul 2020 00:11:09

RE: Stop Executing Queries Multiple Times

REST API calls are sending almost 10 queries for datasets larger than 10k records before loading. (PBI Server desktop Sept. 2019 version)

's profile image Profile Picture

099589ac d119-489b-9ac7-dcd9074f835d on 06 Jul 2020 00:04:18

RE: Stop Executing Queries Multiple Times

A decent article/vid on this behavior can be found here:
https://blog.crossjoin.co.uk/2019/10/13/why-does-power-bi-query-my-data-source-more-than-once/

I think the extra querying of metadata is the most difficult to resolve. The workaround in the vid of manually specifying data structure in M code isn't realistic for most people.

's profile image Profile Picture

099589ac d119-489b-9ac7-dcd9074f835d on 06 Jul 2020 00:04:06

RE: Stop Executing Queries Multiple Times

This is becoming a significant concern for us as well. Power BI seems to be putting an unnecessary load on our source systems.

's profile image Profile Picture

1d1c98f5 fa4d-4041-b5ff-31eb5ee46cf7 on 05 Jul 2020 23:52:49

RE: Stop Executing Queries Multiple Times

What type of source are you having issues with? I was seeing the behaviour you describe with Excel files on SharePoint and found that defining them as "From Web" rather than "From Excel" means that they are cached and not reread

's profile image Profile Picture

112850de 2b74-4d6d-a942-e8cfdb27576e on 05 Jul 2020 23:52:10

RE: Stop Executing Queries Multiple Times

No information from Power BI team?
At least please let us know why it happens

's profile image Profile Picture

3877562e 96fe-49ed-bb9b-36d803117070 on 05 Jul 2020 23:50:06

RE: Stop Executing Queries Multiple Times

Not sure if I have the exact same problem as the OP but working on the data model in complex cases is very painful and it needs to be easier to jump between transformations to debug issues without issuing a fresh recall of data

's profile image Profile Picture

8175331a 3c5d-4d74-b43c-82e26abe741e on 05 Jul 2020 23:48:00

RE: Stop Executing Queries Multiple Times

Absolutely ridiculous that this happens. I try to refresh a dashboard, the query for 2 years takes 30 minutes. Three executions of the query (2 of which are unnecessary) take 1 hour 30. Not sure why this is.