Name of the attribute associated with this plan. One of the following:
Attribute
Data type
Description
set_options
int
Indicates the option values that the plan was compiled with.
objectid
int
One of the main keys used for looking up an object in the cache. This is the object ID stored in sys.objects for database objects (procedures, views, triggers, and so on). For plans of type "Adhoc" or "Prepared", it is an internal hash of the batch text.
dbid
int
Is the ID of the database containing the entity the plan refers to.
For ad hoc or prepared plans, it is the database ID from which the batch is executed.
dbid_execute
int
For system objects stored in the Resource database, the database ID from which the cached plan is executed. For all other cases, it is 0.
user_id
int
Value of -2 indicates that the batch submitted does not depend on implicit name resolution and can be shared among different users. This is the preferred method. Any other value represents the user ID of the user submitting the query in the database.
status
int
Internal status bits that are part of the cache lookup key.
required_cursor_options
int
Cursor options specified by the user such as the cursor type.
acceptable_cursor_options
int
Cursor options that SQL Server may implicitly convert to in order to support the execution of the statement. For example, the user may specify a dynamic cursor, but the query optimizer is permitted to convert this cursor type to a static cursor. For more information, see Using Implicit Cursor Conversions.
inuse_exec_context
int
Number of currently executing batches that are using the query plan.
For more information about execution context and query plans, see Execution Plan Caching and Reuse.
free_exec_context
int
Number of cached execution contexts for the query plan that are not being currently used.
hits_exec_context
int
Number of times the execution context was obtained from the plan cache and reused, saving the overhead of recompiling the SQL statement. The value is an aggregate for all batch executions so far.
misses_exec_context
int
Number of times that an execution context could not be found in the plan cache, resulting in the creation of a new execution context for the batch execution.
removed_exec_context
int
Number of execution contexts that have been removed because of memory pressure on the cached plan.
inuse_cursors
int
Number of currently executing batches containing one or more cursors that are using the cached plan.
free_cursors
int
Number of idle or free cursors for the cached plan.
hits_cursors
int
Number of times that an inactive cursor was obtained from the cached plan and reused. The value is an aggregate for all batch executions so far.
misses_cursors
int
Number of times that an inactive cursor could not be found in the cache.
removed_cursors
int
Number of cursors that have been removed because of memory pressure on the cached plan.
sql_handle
varbinary(64)
The SQL handle for the batch.
merge_action_type
smallint
The type of trigger execution plan used as the result of a MERGE statement.
0 indicates a non-trigger plan, a trigger plan that does not execute as the result of a MERGE statement, or a trigger plan that executes as the result of a MERGE statement that only specifies a DELETE action.
1 indicates an INSERT trigger plan that runs as the result of a MERGE statement.
2 indicates an UPDATE trigger plan that runs as the result of a MERGE statement.
3 indicates a DELETE trigger plan that runs as the result of a MERGE statement containing a corresponding INSERT or UPDATE action.
For nested triggers run by cascading actions, this value is the action of the MERGE statement that caused the cascade.