The GENPLAN statement can be useful in determining the way to
write a SELECT, UPDATE, or DELETE statement for maximum performance.
GENPLAN lets you see the optimizer's
access plan for one ALLBASE/SQL statement at
a time. Issue the GENPLAN statement
in ISQL, then simply do a SELECT on the temporary table SYSTEM.PLAN
within the same transaction. A knowledgeable user may be able to use
this information to formulate queries differently, make other
design changes to improve performance,
or use the SETOPT statement to override the optimizer's access plan.
Whenever users have a performance concern about a query, they can
use the GENPLAN statement to generate the access plan for the query
and display the plan information by doing a SELECT on the temporary table
SYSTEM.PLAN. By using GENPLAN and SELECT statements, users can
easily investigate the performance question.
Refer to the ALLBASE/SQL Advanced Application Programming Guide chapter, "Analyzing Queries with GENPLAN,"
and the ALLBASE/SQL Reference Manual for more information about the GENPLAN statement.