Plan Control uses the Plan Guides Management feature introduced in SQL Server 2005. You can use this feature to optimize execution plans and to deploy plan guides for SQL statements without changing the original source code. This feature is particularly useful for third-party applications where you do not have access to the source code.
The process begins with SQL Optimizer analyzing your original SQL statement to generate execution plan alternatives. SQL Optimizer then applies a set of SQL Server hints to each execution plan alternative to generate additional alternatives. Once SQL Optimizer completes this process, you can execute the alternatives to retrieve run time statistics for each execution plan alternative and compare the alternatives to identify the best one for your database environment. You can then deploy the selected alternative as a plan guide to the Manage Plan Guides module.
Plan Control uses the Plan Guides Management feature introduced in SQL Server 2005. You can use this feature to optimize execution plans and to deploy plan guides for SQL statements without changing the original source code. This feature is particularly useful for third-party applications where you do not have access to the source code.
The process begins with SQL Optimizer analyzing your original SQL statement to generate execution plan alternatives. SQL Optimizer then applies a set of SQL Server hints to each execution plan alternative to generate additional alternatives. Once SQL Optimizer completes this process, you can execute the alternatives to retrieve run time statistics for each execution plan alternative and compare the alternatives to identify the best one for your database environment. You can then deploy the selected alternative as a plan guide to the Manage Plan Guides module.
To select a connection
Click
Review the following for additional information:
Select Connection | Description |
Connection |
Click to select a previously created connection. Tip: Click to open the Connection Manager to create a new connection. See Connect to SQL Server for more information. |
Select Database and User | Description |
Database |
Click to select the database to match your SQL statement. |
Set User |
Click to select your user name. |
Plan Control sessions optimize your SQL statement by generating execution plan alternatives for the statement. You can then select an alternative execution plan for your SQL statement and deploy it as a plan guide to improve database performance.
To generate execution plan alternatives
Select the Optimize SQL tab in the main window.
Select Plan Control from the Optimize SQL start page.
Note: If the start page does not display, click the arrow beside and select New Plan Control Session.
Enter a SQL statement in the Original SQL pane.
Click to generate execution plan alternatives.
Tip: Click to abort the process.
You can then test run the generated plan alternatives. See Test Run Execution Plan Alternatives for more information.
To clear the Plan Control window
To clear the results, right-click inside the Original SQL pane and do one of the following:
© ALL RIGHTS RESERVED. 使用条款 隐私 Cookie Preference Center