Requiring Re-Execution Before Cache Insertion

A qualified SQL statement is fully inserted into the SQL statement cache only after the database server counts a configurable number of references (which are sometimes called "hits") to that statement. For the default value of zero, a qualified DML statement does not need to be re-executed before it is cached.

Using the STMT_CACHE_HITS configuration parameter, however, the database administrator (DBA) can specify that qualified DML statements must be executed a minimum number of times before they are inserted into the statement cache. By setting this to a value of one (or to a larger value), the DBA excludes one-time-only ad hoc queries from full insertion into the SQL statement cache, thereby lowering cache-management overhead.