Memory limit and size
Although the database server tries to clean the SQL statement cache, sometimes entries cannot be removed because they are currently in use. In this case, the size of the SQL statement cache can exceed the value of the STMT_CACHE_SIZE configuration parameter.
The default value of the STMT_CACHE_NOLIMIT configuration parameter
is 1
, which means the database server inserts the
statement even though the current size of the cache might be greater
than the value of the STMT_CACHE_SIZE parameter.
If the value of the STMT_CACHE_NOLIMIT configuration parameter
is 0
, the database server does not insert either
a fully-qualified or key-only entry into the SQL statement cache
if the size will exceed the value of STMT_CACHE_SIZE.
- The currsize column shows the number of bytes currently
allocated in the SQL statement
cache.
In ids_prf_171.html#ids_prf_171__sii-04cnfmem-68087, the currsize column has a value of
11264
. - The maxsize column shows the value of STMT_CACHE_SIZE.
In ids_prf_171.html#ids_prf_171__sii-04cnfmem-68087, the maxsize column has a value of
524288
, which is the default value (512 * 1024 = 524288).
- Set the STMT_CACHE_NOLIMIT configuration parameter to 0 to prevent insertions when the cache size exceeds the value of the STMT_CACHE_SIZE parameter.
- Set the STMT_CACHE_HITS parameter to a value greater than 0 to prevent caching unshared SQL statements.
- Update the ONCONFIG file to specify the STMT_CACHE_NOLIMIT configuration parameter. You must restart the database server for the new value to take effect.
- Use the onmode -W command to override the STMT_CACHE_NOLIMIT
configuration parameter dynamically while the database server is running.
onmode -W STMT_CACHE_NOLIMIT 0
If you restart the database server, the value reverts the value in the ONCONFIG file. Therefore, if you want the setting to remain for subsequent restarts, modify the ONCONFIG file.