This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Let's assume we have a very large table that is extracted via the ODBC connector using an SQL command like:
SELECT
A as "Time",
....
FROM DB
WHERE
A >= '01.01.2010'From a performance point of view, would it be beneficial to use query folding here?
I have made the comparison and it does look like query folding extracts the data faster.
But before I extract every table using query folding, I would like to hear your opinion first.
Solved! Go to Solution.
Your issue isn't SQL code vs Query Folding, it is ODBC vs a true SQL connector.
There should be no difference in using SQL code vs Query Folding - assuming the code generated by Query Folding is the same. The end result is the SQL server does the work.
I do not recommend using SQL statements directly though as it can present security issues in the Gateway if used, plus it prevents Incremental Refresh from working, as well as additional Query Folding in Power Query. Even if the statement could be folded, PQ cannot take your code and modify it with its additional statements. So 100% of remaining code happens in the mashup engine.
If you need to use SQL code, create a view on the server and connect PQ to that.
But avoid ODBC. Really slows things down.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingYour issue isn't SQL code vs Query Folding, it is ODBC vs a true SQL connector.
There should be no difference in using SQL code vs Query Folding - assuming the code generated by Query Folding is the same. The end result is the SQL server does the work.
I do not recommend using SQL statements directly though as it can present security issues in the Gateway if used, plus it prevents Incremental Refresh from working, as well as additional Query Folding in Power Query. Even if the statement could be folded, PQ cannot take your code and modify it with its additional statements. So 100% of remaining code happens in the mashup engine.
If you need to use SQL code, create a view on the server and connect PQ to that.
But avoid ODBC. Really slows things down.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingCheck out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.