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.
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.