Azure Synapse itself does not provide a direct graphical view for the EXPLAIN output, you can accomplish this in another way.
First, you need to run your EXPLAIN statement in Azure Synapse Analytics to get the XML query plan. Make sure to copy or save this XML data.
Although your work is in Azure Synapse Analytics, SSMS (a free tool provided by Microsoft for managing SQL Server) can visualize XML plans.
- Open SSMS and connect to any database (it doesn't need to be the source of the plan).
- Save the XML plan you got from Synapse to a
.sqlplan
file. You can do this by opening a new text file, pasting the XML content, and saving the file with a.sqlplan
extension. - Open the
.sqlplan
file in SSMS. SSMS recognizes this file format and automatically renders the query plan graphically.
If SSMS is not an option or you prefer a different tool, there are third-party options available that can visualize SQL query plans from XML. SentryOne Plan Explorer and Redgate's SQL Monitor are examples of such tools.
There are also online SQL plan viewers that can render your XML plan graphically. These tools might come in handy if you cannot or prefer not to install software on your computer. You would need to upload your .sqlplan
file or paste the XML content into the online tool. Be cautious about using online tools if your query plan contains sensitive information. An example of such a tool is the Paste The Plan feature on Brent Ozar website.