Access plan validation

An access plan is a control structure that describes the actions necessary to satisfy each query request. It 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.

To improve performance, an access plan is saved (see exceptions below) once it is built so as to be available for potentially future runs of the query. However, the optimizer has dynamic replan capability. This means that even if previously built (and saved) plan is found, the optimizer may rebuild it if it determines that a more optimal plan is possible. This allows for maximum flexibility while still taking advantage of saved plans.

In all cases above where a plan is saved above, including static SQL, dynamic replan can still apply as the queries are run over time.

The access plan is validated when the query is opened. Validation includes the following: