STMT_CACHE configuration parameter
Use the STMT_CACHE configuration parameter to determine whether the database server uses the SQL statement cache.
- onconfig.std value
STMT_CACHE 0
- values
0
= SQL statement cache not used (equivalent to onmode -eOFF
).1
= SQL statement cache enabled, but user sessions do not use the cache. Users use the cache only if they set the environment variable STMT_CACHE to1
or execute the SQL statement SET STATEMENT CACHE ON.2
= SQL statement cache turned on. All statements are cached. To turn off statement caching, set the environment variable STMT_CACHE to0
or execute the SQL statement SET STATEMENT CACHE OFF.- takes effect
- After you edit your onconfig file and restart the database server.
Usage
You can enable the SQL
statement cache in one of two modes:
- Always use the SQL statement cache unless a user explicitly specifies
not to use it. Set the STMT_CACHE configuration parameter to
2
or onmode -eON
. - Use the SQL statement cache only when a user explicitly specifies
to use it. Set the STMT_CACHE configuration parameter to
1
or onmode -eENABLE
.