O'Reilly logo

Microsoft SQL Server 2012 Performance Tuning Cookbook by Bihag Thaker, Ritesh Shah

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Monitoring performance of a query by SET STATISTICS XML

SET STATISTICS XML is an XML version of the actual execution plan. It provides all the information in XML format which we used to get in graphical format in the actual execution plan.

Getting ready

We are going to use the SELECT query given in the previous recipe's How to do it... section by replacing SHOWPLAN_XML with SET STATISTICS XML. The main intention to use the same query from the previous recipe Monitoring performance of query by SET SHOWPLAN_XML is to see the difference between two execution plan. Generally, if an index and statistics' histogram is updated, then the execution plan on sampling (estimated execution plan) and execution plan on real table (actual execution plan) remain ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required