An access plan is a control structure that describes the actions necessary
to satisfy each query request. An access plan contains information
about the data and how to extract it. For any query, whenever
optimization occurs, the query optimizer develops an optimized plan of how to
access the requested data. The information is kept in what is called a
mini plan. The mini plan, along with the query definition template
(QDT), is used to interface with the optimizer and make an access plan.
- For dynamic SQL, an access plan is created, but the plan is not
saved. A new access plan is created each time the PREPARE statement
runs.
- For an AS/400 program that contains static embedded SQL, the access plan
is saved in the associated space of the program or package that
contains embedded SQL statements.
- For OPNQRYF, an access plan is created but is not saved. A new
access plan is created each time the OPNQRYF command is processed.
- For Query/400, an access plan is saved as part of the query definition
object.
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]