cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cuongle Member
Member

How Power BI direct query optimise SQL

I am not sure that I understand how Power BI direct query works under the hood and whether Power BI optimise the query or not. Assume I have a filter (slicer with single selection) binding on column ColumnX in order to filter data on table: TableY

 

When user select value on slicer, does Power BI optimise query like:

 

SELECT * FROM TABLE tableY

WHERE ColumnX = 'Value'

 

Or, Power BI get all data from TableY and then filter happens in memory

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Moderator Eric_Zhang
Moderator

Re: How Power BI direct query optimise SQL

@cuongle

For SQL Server, I've captured what Power BI does in direct query when selecting the slicer, with the help of SQL Server profiler. Power BI actually sends a query with where filter as you mentioned, instead of get all data and filter in memory, though the query is usually not efficient.  So I think the similar behavior is applied when connecting to other databases and it can be easily proved with individual profiler tools.

 

 

View solution in original post

1 REPLY 1
Moderator Eric_Zhang
Moderator

Re: How Power BI direct query optimise SQL

@cuongle

For SQL Server, I've captured what Power BI does in direct query when selecting the slicer, with the help of SQL Server profiler. Power BI actually sends a query with where filter as you mentioned, instead of get all data and filter in memory, though the query is usually not efficient.  So I think the similar behavior is applied when connecting to other databases and it can be easily proved with individual profiler tools.

 

 

View solution in original post

Helpful resources

Announcements
New Topics Started Badges Coming

New Topics Started Badges Coming

We're releasing new versions of the badge that everyone's talking about. ;) Check your inbox for notifications.

MBAS 2020

Save the new date (and location)!

Our business applications community is growing—so we needed a different venue, resulting in a new date and location. See you there!

Difinity Conference

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)