This configuration parameter sets the default statement concentrator behavior.
This configuration parameter enables statement concentration for dynamic statements. The setting in the database configuration is used only when the client does not explicitly enable or disable statement concentrator.
When enabled, statement concentrator modifies dynamic statements to allow increased sharing of package cache entries.
Statement concentrator is disabled when the configuration parameter is set to OFF. When the configuration parameter is set to LITERALS, statement concentrator is enabled. When statement concentrator is enabled, SQL statement that are identical, except for the values of literals in the statements, might share package cache entries.
SELECT FIRSTNME, LASTNAME FROM EMPLOYEE WHERE EMPNO='000020'
and SELECT FIRSTNME, LASTNAME FROM EMPLOYEE WHERE EMPNO='000070'
will
share the same entry in the package cache. Then entry in the package
cache will use the statementSELECT FIRSTNME, LASTNAME FROM EMPLOYEE WHERE EMPNO=:L0
and DB2® will provide the value for :L0(either '000020' or '000070')
based
on the literal used in the original statements.This parameter can have a significant impact on plan selection because it alters the statement text. Statement concentrator must be used only when similar statements in the package cache have similar plans. For example, if different literal values in a statement result in significantly different plans, then statement concentrator must not be set to LITERALS.
The stmt_conc configuration parameter might cause the length attributes for VARCHAR and VARGRAPHIC string literals to be greater than the length of the string literal.
SELECT REPLACE(WORKDEPT,'E2','E9') FROM EMPLOYEE
When stmt_conc=LITERALS, the two string literals are replaced with parameter markers and the return type is VARCHAR(6).