Difference between revisions of "Optimizing Indexes using SYNCNUM"

From Recital Documentation Wiki
Jump to: navigation, search
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Recital Character and date indexes can be 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.
+
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 using the [[DB_INDEXSEQNO]] environment variable/symbol. This updates the [[SYNCNUM]] column of all new rows added to tables. In turn, 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 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 9 tables can be populated using the [[dbconvert]] utility and the [[CONVERT]] command.  The dbconvert utility is used from the operating system prompt:
+
The index for existing Recital tables from earlier versions should be rebuilt ([[INDEX]]) for use in Recital 10.  The rebuild will add the [[SYNCNUM]] to the key.
 
+
 
+
<pre>
+
$ dbconvert index <table name>.dbf
+
</pre>
+
 
+
 
+
or, to convert all dbf files in the current directory:
+
 
+
<pre>
+
$ dbconvert index
+
</pre>
+
 
+
 
+
For more information please see the [[CONVERT]] command.
+
 
+
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 "[[dbconvert]] index" or "[[CONVERT]] index" to manually convert your tables before setting [[DB_INDEXSEQNO]] to true.
+
  
 
[[Category:Documentation]]
 
[[Category:Documentation]]
[[Category:Reference]]</pre>
+
[[Category:Reference]]

Latest revision as of 11:07, 5 October 2010

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 index for existing Recital tables from earlier versions should be rebuilt (INDEX) for use in Recital 10. The rebuild will add the SYNCNUM to the key.