IBM Books

Access plan

Certain data is necessary to resolve an explainable SQL statement. An access plan specifies an order of operations for accessing this data. It lets you view statistics for selected tables, indexes, or columns; properties for operators; global information such as table space and function statistics; and configuration parameters relevant to optimization. With Visual Explain installed on your workstation, you can view the access plan for an SQL statement in graphical form.

The optimizer produces an access plan whenever an explainable SQL statement is compiled. This happens at prep/bind time for static statements, and at run time for dynamic statements.

It is important to understand that an access plan is an estimate based on the information that is available. The optimizer bases its estimations on information such as the following:

Cost information associated with an access plan is the optimizer's best estimate of the resource usage for a query. The actual elapsed time for a query may vary depending on factors outside the scope of DB2 (for example, the number of other applications running at the same time). Actual elapsed time can be measured while running the query, by using performance monitoring.

[ Top of Page | Table of Contents | Glossary | Index ]

[ DB2 List of Books | Search the DB2 Books ]