
Considerations for Using the Showplan SET Statement Options
When you display an execution plan using the SHOWPLAN SET options, the statements you submit to the server are not executed. Instead, SQL Server analyzes the query and displays, in a series of operators, how the statements would have been executed.
Note: |
|---|
|
Because statements are not executed when the execution plan is displayed, Transact-SQL operations are not actually carried out. So, for example, if a CREATE TABLE statement is part of an execution plan, any later operations involving the "created" table returns errors, because the table does not exist. However, there are two exceptions to this rule: temporary tables are created when using the SHOWPLAN SET options, and USE db_name statements are executed and attempt to change the database context to the db_name specified when using the SHOWPLAN SET options.
|
When you display an execution plan using the STATISTICS SET options, the Transact-SQL statements you submit to the server are executed.
Note: |
|---|
|
The Showplan SET options display no information about encrypted stored procedures or triggers.
|