The BIND process determines access path for SQL. Before moving on to the new features of BIND, here is my previous post on DB2 BIND options.
DB2 Bind: APCOMPARE Vs. APREUSE
“The access path for static SQL will not change since it is determined during the BIND process. The PLAN_TABLE stores information about the access path.“

DB2 Bind Process
EXPLAIN PACKAGE
A newly SQL query that updates package details in PLAN_TABLE.
EXPLAIN PACKAGE package-scope-specification
EXPLAIN PACKAGE COLLECTION 'APCMPCOB' PACKAGE 'APCMPCOB'
APCOMPARE and APREUSE
This option is now part of the BIND process. It compares the results of BIND PACKAGE and REBIND PACKAGE. The NO is the default. It means not for comparing. The scenario occurs when DB2 migrates to the new version and to decide whether REBIND is required or not, helpful to know.
The WARN option pops a warning message when the new access path differs. The ERROR option pops an error when the new access path mismatches and it will not BIND or REBIND.
APCOMPARE (Access path compare). APREUSE (Access path reuse).
- NO or NONE
- WARN
- ERROR
The APREUSE again has two options. The NO means no action. If it is the ERROR, and you set EXPLAIN(YES), then it replaces the stored access path with the new one.
- NO or NONE
- ERROR
Related







You must be logged in to post a comment.