Plan Guide Properties

Use this page to view the properties of plan guides in the selected database. This page is accessed by right-clicking an existing plan guide and clicking Properties.

Plan guides influence query optimization by attaching query hints or a fixed query plan to them. In the plan guide, you specify the Transact-SQL statement that you want optimized and either an OPTION clause that contains the query hints you want to use or a specific query plan you want to use to optimize the query. When the query executes, the query optimizer matches the Transact-SQL statement to the plan guide and either attaches the OPTION clause to the query at run time or uses the specified query plan.

Options

  • Hints
    Displays the query hints or query plan to be applied to the Transact-SQL statement. When a query plan is specified as a hint, the XML Showplan output for the plan is displayed.

  • Is disabled
    Displays the status of the plan guide. Possible values are True and False.

  • Name
    Displays the name of the plan guide.

  • Parameters
    When the scope type is SQL or TEMPLATE, displays the name and data type of all parameters that are embedded in the Transact-SQL statement.

  • Scope batch
    Displays the batch text in which the Transact-SQL statement appears.

  • Scope object name
    When the scope type is OBJECT, displays the name of the Transact-SQL stored procedure, user-defined scalar function, multistatement table-valued function, or DML trigger in which the Transact-SQL statement appears.

  • Scope schema name
    When the scope type is OBJECT, displays the name of the schema in which the object is contained.

  • Scope type
    Displays the type of entity in which the Transact-SQL statement appears. This specifies the context for matching the Transact-SQL statement to the plan guide. Possible values are OBJECT, SQL, and TEMPLATE.

  • Statement
    Displays the Transact-SQL statement against which the plan guide is applied.