Difference between revisions of "SET ICACHE"

From Recital Documentation Wiki
Jump to: navigation, search
 
Line 36: Line 36:
 
==Products==
 
==Products==
 
Recital Database Server, Recital Mirage Server, Recital Terminal Developer
 
Recital Database Server, Recital Mirage Server, Recital Terminal Developer
 +
[[Category:Documentation]]
 +
[[Category:Commands]]
 +
[[Category:Set_Commands]]

Revision as of 17:07, 10 March 2009

SET ICACHE

Class

Performance and Optimization


Purpose

Specify number of buffers to use for index files


Syntax

SET ICACHE TO [<expN>] [OPTIMUM]


See Also

SET CACHELOAD, SET DCACHE, SET ICACHE, SET GCACHE, SET PCACHE


Description

The SET ICACHE TO <expN> command specifies the number of index file buffers to be used. The icache buffer is specific to each index file that is opened. The larger the number of ICACHE buffers, the better the performance of FIND and SEEK operations on large tables. The ICACHE can also accelerate the INDEX, REINDEX, TOTAL and SORT commands. If the OPTIMUM keyword is specified, then the optimum size for index caching will automatically be calculated. For manual settings, the <expN> can be calculated with the ICACHE() function.

There is no benefit in having a large ICACHE with index files that are shareable. The SET ICACHE command has no effect if a table is shareable, unless SET GCACHE is set ON. When SET GCACHE is ON, SET DCACHE and SET ICACHE operate on a distributed basis. The SET ICACHE command can be used in conjunction with the SET PCACHE, and the SET DCACHE commands to optimize performance. The value <expN> specified with the SET ICACHE command is the number of disk blocks to be buffered in memory. When a request is made to read a particular disk block from an index file, the ICACHE is first inspected to see if the block is already in memory. If it is, then the block is merely copied from memory. If the block is not in memory, the required block is read from the index file, and placed it in the ICACHE. The LIST STATUS command displays the current setting of ICACHE of each individual index. By default, ICACHE is set to 20, the minimum value is 2.


Example

set icache to 100
use patrons index events, dates, names
// Another example
use accounts index acc_prefix, paid_date
set icache to reccount()
reindex


Products

Recital Database Server, Recital Mirage Server, Recital Terminal Developer