SET SQLCACHE

From Lianjapedia
Jump to: navigation, search

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)