Forum Discussion
Power Query Vs SQL Efficiency
- 7 years ago
When connecting to SQL DB, Power Query tries to do Query Folding and tries to push maximum logics to data source, means the time take in Power Query and SQL will be the same in such cases. In your example, ideally Power Query should just trigger a SQL with a where clause for the time filter. You can see this by checking "View Native Query" option.
In case you do some transformations which PQ cannot convert to SQL, then it will take more time to process, since PQ has to bring in all the data and do the Transofrmation on its side.
When connecting to SQL DB, Power Query tries to do Query Folding and tries to push maximum logics to data source, means the time take in Power Query and SQL will be the same in such cases. In your example, ideally Power Query should just trigger a SQL with a where clause for the time filter. You can see this by checking "View Native Query" option.
In case you do some transformations which PQ cannot convert to SQL, then it will take more time to process, since PQ has to bring in all the data and do the Transofrmation on its side.