DB2 Version 9.7 for Linux, UNIX, and Windows

Access plan

Certain data is necessary to resolve an explainable statement. An access plan specifies an order of operations for accessing this data.

An access plan 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, you can view the access plan for an SQL or XQuery statement in graphical form.

The optimizer produces an access plan whenever you compile an explainable SQL or XQuery statement. 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 might vary depending on factors outside the scope of the database manager (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.