Difference between revisions of "ICACHE()"

From Lianjapedia
Jump to: navigation, search
m (1 revision)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
 
Function to return optimum ICACHE size for a given index expression
 
Function to return optimum ICACHE size for a given index expression
 
  
 
==Syntax==
 
==Syntax==
 
ICACHE(<exp>[, <expN>])
 
ICACHE(<exp>[, <expN>])
 
  
 
==See Also==
 
==See Also==
 
[[INDEX]], [[REINDEX]], [[SET DCACHE]], [[SET ICACHE]]
 
[[INDEX]], [[REINDEX]], [[SET DCACHE]], [[SET ICACHE]]
 
  
 
==Description==
 
==Description==
Line 15: Line 12:
  
 
If the optional <expN> is specified and is greater than zero (0), the required memory allocation is returned.
 
If the optional <expN> is specified and is greater than zero (0), the required memory allocation is returned.
 
  
 
==Example==
 
==Example==
Line 28: Line 24:
 
</code>
 
</code>
  
 
==Products==
 
Recital Server, Recital
 
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]
[[Category:Indexing]]
+
[[Category:Cursor Functions]]
[[Category:Indexing Functions]]
+
[[Category:Search Functions]]

Latest revision as of 11:16, 4 February 2013

Purpose

Function to return optimum ICACHE size for a given index expression

Syntax

ICACHE(<exp>[, <expN>])

See Also

INDEX, REINDEX, SET DCACHE, SET ICACHE

Description

The ICACHE() function returns the optimum size of the index buffer cache for an index created on the specified expression. The <exp> can either be a numeric value representing the width of the index key, or the index expression. This function is used in conjunction with the SET ICACHE TO command. The command SET ICACHE TO OPTIMUM can be used instead of the ICACHE() function to automate defining index buffer caches.

If the optional <expN> is specified and is greater than zero (0), the required memory allocation is returned.

Example

use names index names
size = icache(indexkey(1))
set icache to size
reindex
use names
set icache to icache(name+left(address, 5))
index on name+left(address, 5) to names