Chat now with support
Chat with Support

SQL Optimizer for SAP ASE 3.8 - Release Notes

Abstract Plan Group

Abstract plans are saved to an abstract plan group. The group has the following elements associated with it:

  • Database
  • User-ID
  • SQL statement
  • Abstract Plan

When you save an abstract plan, you specify the database, group and user. This means that you can have a different abstract plan for different users. It enables SQL optimization to be based on the user’s individual activities.

Here is an example of where you might want to have a different abstract plan for different users. In this example, the column emp_sex is indexed.

select * from employee where emp_sex=:var_sex

If 90% employees are male, then the SQL statement to retrieve the records where the employees are male should not be indexed for the best results.

But the SQL statement to retrieve the 10% of the employees who are female should be indexed.

For Group A users, who always select "male" employees, the Abstract Plan should do full table scan. For Group B users, who always select "female" employees, the Abstract Plan should use an index scan.

If you use the default group of ap_stdin, you can set Adaptive Server to use this group server-wide. You must save each abstract plan that you want to use system-wide in this group.

You can set up Adaptive Server to use different abstract plans for the same SQL statement from different applications. In this case, you create a different group for each application. For each user that you want to use a specific abstract plan, you must save that abstract plan in the group.

 

Related Topics

Abstract Plan Compatibility with Original SQL

Abstract Plan Manager Window

Open the Abstract Plan Manager

Abstract Plan Group Functions

Abstract Plan Manager Overview

Export a Group to a Table

Import an Abstract Plan for each User

Abstract Plan ID Functions

Use Saved Abstract Plans

Related Documents

The document was helpful.

Select Rating

I easily found the information I needed.

Select Rating