지금 지원 담당자와 채팅
지원 담당자와 채팅

SQL Optimizer for SAP ASE 3.8 - Release Notes

Abstract Plan Compatibility with Original SQL

Adaptive Server generates an abstract plan based on the SQL syntax itself. If a SQL statement is transformed to another syntax that the Adaptive Server optimizer cannot transform internally, then the abstract plans are not compatible. Therefore, even though two SQL statements may be semantically equivalent, their abstract plans are not compatible.

For example, take this SQL statement as your original SQL statement:

SELECT A CITY FROM A, B, C

WHERE A.CITY =B.CITY

AND B.CITY=C.CITY

And take this semantically equivalent alternative SQL:

SELECT A.CITY FROM A, B, C

WHERE A.CITY =B.CITY

AND B.CITY=C.CITY

AND A.CITY=C.CITY

The transforms adds the new condition, A.CITY=C.CITY, and if the Adaptive Server optimizer cannot generate A.CITY=C.CITY internally for your original SQL, then an index scan from A.CITY to C.CITY or from C.CITY to A.CITY is not possible for your original SQL. So, the new abstract plan is not compatible for the original SQL.

Also, if an OR condition is transformed to a UNION, the new abstract plan is so different from the original SQL that there is no way for the original SQL to be compatible with the new abstract plan.

 

Related Topics

Abstract Plan Group

Why Save the Abstract Plan?

Open the Abstract Plan Manager

Abstract Plan Group Functions

Export a Group to a Table

Import an Abstract Plan for each User

Abstract Plan ID Functions

관련 문서

The document was helpful.

평가 결과 선택

I easily found the information I needed.

평가 결과 선택