Difference between revisions of "SET ICACHE"

From Recital Documentation Wiki
Jump to: navigation, search
 
(One intermediate revision by one user not shown)
Line 1: Line 1:
==Class==
 
Performance and Optimization
 
 
 
 
==Purpose==
 
==Purpose==
 
Specify number of buffers to use for index files
 
Specify number of buffers to use for index files
Line 32: Line 28:
  
 
==Products==
 
==Products==
Recital Database Server, Recital Mirage Server, Recital Terminal Developer
+
Recital Server, Recital  
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Commands]]
 
[[Category:Commands]]

Latest revision as of 16:06, 23 November 2009

Purpose

Specify number of buffers to use for index files


Syntax

SET ICACHE TO [<expN>] [OPTIMUM]


See Also

DISPLAY STATUS, FIND, ICACHE(), INDEX, LIST STATUS, REINDEX, SEEK, SET CACHELOAD, SET DCACHE, SET FCACHE, SET GCACHE, SET PCACHE, TOTAL

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 100, 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 Server, Recital