Difference between revisions of "SET ICACHE"

From Lianjapedia
Jump to: navigation, search
m (1 revision)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
 
Specify number of buffers to use for index files
 
Specify number of buffers to use for index files
 
  
 
==Syntax==
 
==Syntax==
 
SET ICACHE TO [<expN>] [OPTIMUM]
 
SET ICACHE TO [<expN>] [OPTIMUM]
 
  
 
==See Also==
 
==See Also==
[[DISPLAY STATUS]], [[FIND]], [[ICACHE()]], [[INDEX]], [[LIST STATUS]], [[REINDEX]], [[SEEK]], [[SET CACHELOAD]], [[SET DCACHE]], [[SET FCACHE]], [[SET GCACHE]], [[SET PCACHE]], [[TOTAL]]
+
[[DISPLAY STATUS]], [[FIND]], [[ICACHE()]], [[INDEX]], [[LIST STATUS]], [[REINDEX]], [[SEEK]], [[SET CACHELOAD]], [[SET DCACHE]], [[SET FCACHE]], [[TOTAL]]
  
 
==Description==
 
==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.
 
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.
+
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.
 
+
  
 
==Example==
 
==Example==
Line 26: Line 23:
 
reindex</code>
 
reindex</code>
  
 
==Products==
 
Recital Server, Recital
 
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Commands]]
 
[[Category:Commands]]
 
[[Category:Set_Commands|ICACHE]]
 
[[Category:Set_Commands|ICACHE]]
[[Category:Indexing]]
+
[[Category:NoSQL Commands]]
[[Category:Indexing Set Commands]]
+
 
[[Category:Performance and Optimization]]
 
[[Category:Performance and Optimization]]
[[Category:Performance and Optimization Set Commands]]
 

Latest revision as of 12:50, 4 February 2013

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, 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.

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.

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