Difference between revisions of "SET SQLCACHE"
From Lianjapedia
Yvonne.milne (Talk | contribs) (Created page with "==Purpose== SQL Engine caching ==Syntax== SET SQLCACHE TO [<expN>] SET SQLCACHE ON | OFF | (<expL>) ==See Also== SET CACHELOAD, SET DCACHE, SET ICACHE ==Descri...") |
Yvonne.milne (Talk | contribs) |
||
Line 20: | Line 20: | ||
set sqlcache to 128 | set sqlcache to 128 | ||
− | // ODBC | + | // ODBC/SQL Server |
hn = sqlconnect("Lianja_Southwind") | hn = sqlconnect("Lianja_Southwind") | ||
sqlexec(hn,"lianja set sqlcache to 128") | sqlexec(hn,"lianja set sqlcache to 128") |
Latest revision as of 11:23, 20 March 2013
Contents
Purpose
SQL Engine caching
Syntax
SET SQLCACHE TO [<expN>]
SET SQLCACHE ON | OFF | (<expL>)
See Also
SET CACHELOAD, SET DCACHE, SET ICACHE
Description
If SET SQLCACHE is ON the SQL Engine caches the row pointers in memory rather than writing them to disk, thus reducing disk I/O and increasing performance. SET SQLCACHE is ON by default.
SET SQLCACHE TO <expN> specifies the cache allocation size. If a query requires more space it is automatically extended in unit sizes specified by <expN>. If <expN> is not specified, the size is set to the default value of 64kB.
Example
set sqlcache on set sqlcache to 128 // ODBC/SQL Server hn = sqlconnect("Lianja_Southwind") sqlexec(hn,"lianja set sqlcache to 128") // ... sqldisconnect(hn)