SYNOPSIS<SQLCACHE = n>
DESCRIPTION
The SQLCACHE
directive sets how many idle Texis (SQL) handles
to cache for SQL
statements, SQL expressions and state-table
exports. The default is 2, which is adequate for most scripts.
The cache is automatically increased when needed, e.g. if nested
SQL
statements exceed the cache size. Generally the only time
the cache should be explicitly increased with SQLCACHE
is to
optimize scripts that repeatedly re-use a lot of the same SQL-expression
assignment or SQL
statements in a loop. In such cases setting
the cache to the number of unique re-used statements may speed up the
process. The larger the cache, the more file handles and memory used,
so it is best not to make the cache too large.
EXAMPLE<SQLCACHE = 5>
CAVEATSSQLCACHE
is a directive and as such must appear before any
functions. It first appeared in version 2.1.873200000 19970902.
If the SQLCACHE
value is set too high, the process may run
out of file handles, causing errors.