sys.plan_guides (Transact-SQL)
TOC
Collapse the table of content
Expand the table of content

sys.plan_guides (Transact-SQL)

 

Updated: June 10, 2016

THIS TOPIC APPLIES TO:yesSQL Server (starting with 2008)yesAzure SQL DatabasenoAzure SQL Data Warehouse noParallel Data Warehouse

Contains a row for each plan guide in the database.

Column nameData typeDescription
plan_guide_idintUnique identifier of the plan guide in the database.
namesysnameName of the plan guide.
create_datedatetimeDate and time the plan guide was created.
modify_dateDatetimeDate the plan guide was last modified.
is_disabledbit1 = Plan guide is disabled.

0 = Plan guide is enabled.
query_textnvarchar(max)Text of the query on which the plan guide is created.
scope_typetinyintIdentifies the scope of the plan guide.

1 = OBJECT

2 = SQL

3 = TEMPLATE
scope_type_descnvarchar(60)Description of scope of the plan guide.

OBJECT

SQL

TEMPLATE
scope_object_idIntobject_id of the object defining the scope of the plan guide, if the scope is OBJECT.

NULL if the plan guide is not scoped to OBJECT.
scope_batchnvarchar(max)Batch text, if scope_type is SQL.

NULL if batch type is not SQL.

If NULL and scope_type is SQL, the value of query_text applies.
parametersnvarchar(max)The string defining the list of parameters associated with the plan guide.

NULL = No parameter list is associated with the plan guide.
hintsnvarchar(max)The OPTION clause hints associated with the plan guide.

The visibility of the metadata in catalog views is limited to securables that a user either owns or on which the user has been granted some permission. For more information, see Metadata Visibility Configuration.

Catalog Views (Transact-SQL)
sp_create_plan_guide (Transact-SQL)
sp_create_plan_guide_from_handle (Transact-SQL)

Community Additions

ADD
Show:
© 2016 Microsoft