Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hi all,
When importing data from SQL, i usually load in the data alongside a pre-written SQL statement with most transformation defined. From my understanding of QueryFolding, it does the exact same thing for you step by step with each transformation done on PowerQuery.
Is there any difference in performance given that transformation is identical between both methods? Wouldn’t having a pre-written SQL statement be more efficient on the SQL side and prevent potential table locking?
Also, can i enable Queryfolding after hand when I import the data with an SQL script?
Solved! Go to Solution.
@Bokchoy
Pre-written SQL statement with NO power query transformations is the most efficient.
If you use it then you can't add power query steps or you will lose folding.
If you use the GUI of Power Query then you can also achieve Query folding but that's depend on the transformations you do.
You can check to see if the query is folded by right clicking the last step and view the native query if available. Best thing is to check with SQL profiler what is the queries being sent to the data source to verify if there was a query folding or not.
@Bokchoy
Pre-written SQL statement with NO power query transformations is the most efficient.
If you use it then you can't add power query steps or you will lose folding.
If you use the GUI of Power Query then you can also achieve Query folding but that's depend on the transformations you do.
You can check to see if the query is folded by right clicking the last step and view the native query if available. Best thing is to check with SQL profiler what is the queries being sent to the data source to verify if there was a query folding or not.
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 63 | |
| 51 | |
| 41 | |
| 23 | |
| 18 |
| User | Count |
|---|---|
| 134 | |
| 111 | |
| 50 | |
| 31 | |
| 29 |