This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
dev:sql:statements:update_indexes:home [2010/07/02 21:31] tdo |
dev:sql:statements:update_indexes:home [2012/10/26 15:00] (current) |
||
|---|---|---|---|
| Line 13: | Line 13: | ||
| <code> | <code> | ||
| UPDATE INDEXES [ FOR environment_object ] | UPDATE INDEXES [ FOR environment_object ] | ||
| - | [ ON [INSTANCE] instance ] | + | [ ON [INSTANCE] instance_no ] |
| [ WITH options ] | [ WITH options ] | ||
| </code> | </code> | ||
| Line 30: | Line 30: | ||
| os> | os> | ||
| </code> | </code> | ||
| - | |||
| ==== UPDATE INDEXES FOR environment_object ==== | ==== UPDATE INDEXES FOR environment_object ==== | ||
| A specific Database, Table, Column, or Index object can be specified to limit the area to build the indexes. | A specific Database, Table, Column, or Index object can be specified to limit the area to build the indexes. | ||
| Line 38: | Line 37: | ||
| update indexes for table trans_table; | update indexes for table trans_table; | ||
| - | update indexes for column trans_table.trans_date;==== WITH Options ==== | + | update indexes for column trans_table.trans_date; |
| + | ==== WIth Options ==== | ||
| + | |||
| + | === MAX_THREADS - Setting the number of processors used for indexing === | ||
| + | MAX_THREADS=thread_count allows the setting of the maximum number of processors to be used during the update index process. | ||
| + | |||
| + | update indexes with max_threads=4; | ||
| + | |||
| + | === LOG - Setting the log directory === | ||
| LOG=<directory> will cause Omnidex to write indexing logs to the specified directory. This is particularly useful for reviewing the status of large UPDATE INDEX operations. The directory has to be created before the UPDATE INDEXES statement is used. | LOG=<directory> will cause Omnidex to write indexing logs to the specified directory. This is particularly useful for reviewing the status of large UPDATE INDEX operations. The directory has to be created before the UPDATE INDEXES statement is used. | ||
| - | update indexes with log=odxlogs; | + | UPDATE INDEXES WITH LOG=odxlogs; |
| + | UPDATE INDEXES WITH LOG=c:\mydatabase\log | ||
| + | |||
| + | === BUF - Setting the amount of indexing memory === | ||
| BUF=mega_bytes is used to increase the internal size of indexing buffers used by the Omnidex indexing operation. | BUF=mega_bytes is used to increase the internal size of indexing buffers used by the Omnidex indexing operation. | ||
| UPDATE INDEXES WITH BUF=1024 | UPDATE INDEXES WITH BUF=1024 | ||
| + | |||
| ===== Examples ===== | ===== Examples ===== | ||
| The following example will create a logging directory relative to the current directory that Omnidex will use to write indexing information during the index process. The example also uses the OdxSQL SETENV command to set the OA_MAX_ROWS environment variable to limit the maximum number of reads for each table to 100,000 rows to facilitate testing. | The following example will create a logging directory relative to the current directory that Omnidex will use to write indexing information during the index process. The example also uses the OdxSQL SETENV command to set the OA_MAX_ROWS environment variable to limit the maximum number of reads for each table to 100,000 rows to facilitate testing. | ||
| Line 55: | Line 66: | ||
| > update indexes with log=odxlogs; | > update indexes with log=odxlogs; | ||
| > setenv oa_max_rows | > setenv oa_max_rows | ||
| - | > update indexes with log=odxlogs; | ||
| > exit | > exit | ||
| os> | os> | ||