SHOWPLAN_XML in Fabric Data Warehouse
We are excited to announce support for SHOWPLAN_XML in Microsoft Fabric Data Warehouse. This capability allows users to generate and view the estimated query execution plan in XML format, a tool for analyzing and optimizing SQL queries. Whether you’re troubleshooting performance bottlenecks or refining query strategies during development, SHOWPLAN_XML offers a granular, detailed view of how the database engine plans to execute your queries. By providing insights into operations like joins, data movements, etc. it helps pinpoint inefficiencies and identify opportunities to enhance performance.
How can you use SHOWPLAN_XML?
Enabling SHOWPLAN_XML
To enable SHOWPLAN_XML, execute the following SQL command:
SET SHOWPLAN_XML ON;
This command instructs the Fabric DW to return execution plans in XML format for all subsequent queries.
Running Queries
After enabling SHOWPLAN_XML, run the queries that you wish to analyze. The execution plan for this query will be returned in XML format.
Capturing the Output
Capture the SHOWPLAN_XML output by saving the result set to a file or copying it to an XML viewer. Ensure that the entire XML content is preserved for accurate analysis.
- When running SHOWPLAN_XML in Fabric UI, copy results and save them as a .sqlplan file. Open this file in SSMS to view the graphical plan. 

- If running in SSMS, use the SET SHOWPLAN_XML syntax as explained above. You can also use the plan Display Estimated Plan button to see the graph.

Turn OFF SHOWPLAN_XML
Run SET SHOWPLAN_XML OFF to receive results instead of the execution plan when you run queries.
For more details, check out our documentation: SET SHOWPLAN_XML (Transact-SQL) – SQL Server. Submit your feedback on Fabric Ideas and join the conversation on the Fabric Community.

