2.7 How does the optimizer locate rows in dbefiles?
Key points
When you issue an SQL statement, the optimizer chooses the type of scan
that will be used to locate the rows that qualify for the query (it usually
chooses a scan that will result in the fewest I/O operations needed to
read the requested data). Four types of scans are possible:
serial scan
index scan
hash scan
TID scan
Each of these scan types will be described in detail on the next few pages.
The optimizer also makes decisions about join order, join method, and sort
operations. The access plan for a query is the method chosen by the
optimizer as the most efficient method to access the rows that qualify for the
query.
In ISQL, you can use the GENPLAN statement to generate the
optimizer's access plan for a particular SELECT, UPDATE, or
DELETE statement. The resulting access plan is inserted into
the pseudo-table SYSTEM.PLAN. Please refer to the ALLBASE/SQL Reference
Manual for more information about GENPLAN and SYSTEM.PLAN.