Stabilizing dynamic SQL statements
You can use the dynamic SQL plan stability feature of Db2 to help achieve access path stability for dynamic SQL statements. When this feature is enabled, Db2 stores and retrieves statement cache structures in the catalog to avoid full prepare operations.
Before you begin
- The subsystem must be running on Db2 12 function level 500 or higher.
- The CACHEDYN subsystem parameter must be set to YES, and the CACHEDYN_STABILIZATION subsystem parameter must be set to either BOTH or CAPTURE. (To change these parameter values, follow the instructions in Managing Db2 subsystem parameters.)
Procedure
To stabilize dynamic SQL statements: