New sys.dm_exec_query_statistics_xml Dynamic Management Function is available in SQL Server 2016 SP1

Applies to: SQL Server 2016 DeveloperSQL Server 2016 EnterpriseSQL Server 2016 Enterprise Core More

Summary


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.

References


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