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

Using the SET SHOWPLAN Options

In addition to the graphical execution plans available in SSMS, SQL Server 2012 provides three SET SHOWPLAN options to display the execution plan information in a text or XML format. These options are SET SHOWPLAN_TEXT, SET SHOWPLAN_ALL, and SET SHOWPLAN_XML. When one of these options is enabled, SQL Server returns the execution plan generated for the query, but no results are returned because the query is not executed. It’s similar to the Display Estimated Execution Plan option in SSMS.

You can turn on the textual execution plan output in a couple of ways. One way is to issue the SET SHOWPLAN_TEXT ON, SET SHOWPLAN_ALL ON, or SET SHOWPLAN_XML ON command directly in the SSMS query window. These commands must be ...

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