In order to move the saved abstract plan from one user to another or from one database to other, you first export the group in which it is saved to a table in your database, and then you import the group to another user or database.
To export a group
In the left pane of the Abstract Plan Manager, right-click and select Group | Export.
In the Export Plan window under the Export from section, select the name of the database, user, and abstract plan group where you saved the abstract plan.
Under the Export to section, select the database and user. Enter a new table name to store the group in. You cannot use an existing table.
Abstract Plan Compatibility with Original SQL
Open the Abstract Plan Manager
Import an Abstract Plan for each User
Once the abstract plan group is exported to a table in your database, you can import it to as many users or databases as you would like.
To import an abstract plan for each user
In the left pane of the Abstract Plan Manager, right-click and select Group | Import.
In the Import Plan window under the Import from section, select the database, user and table name where you exported the group.
Under the Import to section, select the name of the database, user, and abstract plan group where you want to import the abstract plans.
Abstract Plan Compatibility with Original SQL
Open the Abstract Plan Manager
The following are the functions that are performed on abstract plan IDs.
To use these functions
Right-click the plan ID in the left pane and select the function.
Item |
Description |
Drop |
Drops the selected plan. |
Copy |
Copies selected plan to another group |
Edit |
Brings up the Edit Plan window so you can modify the abstract plan. |
Find Abstract Plan with Text |
Searches for a keyword in the SQL text and abstract plan. |
Find Abstract Plan with ID |
Searches for a specific plan ID |
To use the Abstract Plans for specific users,you enable the use of the Abstract Plan for a specific group on a session level. Therefore, if you have saved Abstract plans in a specific group and you want to use them, you need to set Adaptive Server to use the Abstract Plans in that group. In your application you need to add the following commands:
Note: If the abstract plan is used by many users, you must have already imported the Abstract Plan for each user.
When you are viewing the Plan ID, you can view the Definition, the SQL Text, or the Abstract Plan Text by select the corresponding tab. When you are viewing SQL Text, you can format the text by selecting the Format SQL checkbox or the Word Wrap checkbox.
Abstract Plan Compatibility with Original SQL
Open the Abstract Plan Manager
Abstract Plan Manager Overview
Import an Abstract Plan for each User
To use the abstract plan in your applications you have to either enable the abstract plan loading in the server-wide mode or enable the Abstract Plan loading for the session-level inside your application
The abstract plans that you want all applications to use must be saved in the ap_stdin group. If you want different abstract plans for different applications, you must save them in a group and associate it with a user.
To use the Abstract Plans for specific users, you enable the use of the Abstract Plan for a specific group on a session level. Therefore, if you have saved abstract plans in a specific group and you want to use them, you need to tell Adaptive Server to use the abstract plans in that group. In your application you need to add the following commands:
Note: If the abstract plan is used by many users, you must have already imported the abstract plan for each user.
Example:
set plan load group_name on
go
*some queries*
go
set plan load off
go
You can enable Adaptive Server to use the abstract plans server-wide from the default group of ap_stdin.
To use the same abstract plan for all applications, the system administrator must set the abstract plan load sp_configure parameter to 1. Adaptive Server then uses the stored abstract plans from the default group ap_stdin.
Note: You can override the use of the abstract plan from ap_stdin for a specific SQL statement with the session-level "set plan load" command in the application.
Abstract Plan Compatibility with Original SQL
Open the Abstract Plan Manager
© 2024 Quest Software Inc. ALL RIGHTS RESERVED. 利用規約 プライバシー Cookie Preference Center