O'Reilly logo

Microsoft® SQL Server 2012 Unleashed by Alex T. Silverstein, Chris Gallelli, Paul T. Bertucci, Ray Rankins

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

Query Statistics

In addition to the new dynamic management objects, SQL Server 2012 still provides the SET STATISTICS IO and SET STATISTICS TIME options, which display the logical and physical page reads incurred by a query and the CPU and elapsed time, respectively. These two SET options return statistics only from the actual execution of a query, as opposed to the estimates returned by SSMS and the SHOWPLAN options discussed previously. These two tools can be very useful in determining the actual cost of a query.

In addition to the IO and TIME statistics, SQL Server also provides the SET STATISTICS PROFILE and SET STATISTICS XML options. These options are provided to display execution plan information while also allowing the query to be executed. ...

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