Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In addition to the Enabled and Drop controls, each plan guide entry on the tab shows columns corresponding to the sp_create_plan_guide call arguments the plan guide was created with.

ColumnDescription
Name

The name given the plan guide when it was created. 

Statement

The text of the Transact-SQL statement 

Type

The type of entity in which the statement occurs:

  • OBJECT. In the context of a stored procedure, scalar function, multi-statement table- valued function, or DML trigger in the current database.
  • SQL. In the context of a stand-alone statement or batch.
  • TEMPLATE. Specifies that this plan guide applies to any query that parameterizes to the specified statement form. Only the PARAMETERIZATION { FORCED | SIMPLE } hint can be specified if a Type of TEMPLATE is specified. 
Module/BatchSpecifies either the name of the object in which the statement occurs or the batch text in which the statement appears. 
ParametersSpecifies the definitions of all parameters in the statement. 
Hints

Can be one of the following:

  • An OPTION clause containing any valid sequence of query hints
  • A query plan in XML format to be applied as a hint
  • NULL
Info

For a detailed understanding of the Parameters and Hints values, particularly when using the edit plan guide functionality described below, see the Microsoft SQL Server documentation. 

...

  1. Right-click a plan guide entry and select Edit to open the Edit Plan Guide.
  2. In the Parameters field, provide a valid sp_create_plan_guide stored procedure call
    @params = argument 
  3. In the Hints field, provide a valid sp_create_plan_guide stored procedure call
    @hints = argument
  4. Click Next to preview the generated stored procedure calls.
  5. Click Finish.


Scroll pdf ignore
Automate SQL tuning and profiling with DB Optimizer. Learn more > >