Sign in with Microsoft
Sign in or create an account.
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.


Statistics XML is one of the most widely used support features to debug query issues. If you set “STATISTICS XML ON” and run a query, the engine generates showplan XML with operator-level statistics (such as row count and CPU time) at the end of the query execution. However, the requirement for successful execution of the query limits its usage. For example, you may be unable to obtain the result of showplan XML for long-running queries or for queries that don't finish and therefore return an error.

A new Dynamic Management Function (DMF), sys.dm_exec_query_statistics_xml, is now available. This DMF can retrieve showplan XML with transient statistics. For example, you can now use this DMF to gain the plan for a query while it is running.

More Information

The new DMF functionality is included in Service Pack 1 for SQL Server 2016.

Each new build for SQL Server 2016 contains all the hotfixes and all the security fixes that were included with the previous build. We recommend that you install the latest build for SQL Server 2016.


Learn about the terminology that Microsoft uses to describe software updates.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!