Optimizing Indexes using SYNCNUM

From Recital Documentation Wiki
Revision as of 10:46, 5 October 2010 by Yvonnemilne (Talk | contribs)

Jump to: navigation, search

Recital Character and date indexes are optimized based on the use of the pseudo column SYNCNUM to ensure that all keys are unique. Every row/record in a table has a unique SYNCNUM value for that table.

The optimization is enabled in Recital 10. Any new character or date indexes include the SYNCNUM column automatically: character indexes have SYNCNUM added to the end of the expression, date indexes are converted to DTOS() and have the SYNCNUM added to the end. Numeric index are not affected.

The SYNCNUM pseudo column for existing Recital tables can be populated using the recitalconvert utility and the CONVERT command. The recitalconvert utility is used from the operating system prompt:


$ recitalconvert index <table name>.dbf


or, to convert all dbf files in the current directory:

$ recitalconvert index


For more information please see the CONVERT command and recitalconvert utility.


When DB_INDEXSEQNO is set to true, any tables and indexes that have not previously been converted, will be converted to use the SYNCNUM optimization as they are opened. It is however recommended that you use "recitalconvert index" or "CONVERT index" to manually convert your tables before setting DB_INDEXSEQNO to true.