The daemon, chkind, watches a particular database, and makes sure that the Metamorph indices are maintained in an optimal state. As records are updated or added to the table the index marks these records as requiring a linear scan. This is because the time to search a small amount of text is insignificant when compared to the time required to update the index. Once the amount of changed text reaches a certain size it becomes beneficial to update the index.
The time taken to update the index is significantly greater than the time to insert a single record, so setting the parameters correctly is likely to take some tuning. The number of records to be searched also has an impact on search time. Rough guidelines are that for moderately large fields it is acceptable to set the threshold to several megabytes. Smaller fields may require smaller thresholds. The waiting period should be set to somewhere between a third and a half of the time you expect it to take to reach the threshold. This allows for normal variation in record sizes and entry rates.
Chkind monitors the indices in a database. For each index there are two parameters which determine when it will be re-indexed.
An example of changing the parameters to look at the index every hour,
and update if more than 200k has changed, assuming the index is called
tsql "insert into SYSMETAINDEX values('ix_1', 3600, 200000);"
Chkind must be run on the server machine (the same machine that the database resides on). It must be run as a user with sufficient permissions to modify the indices it is monitoring, and select from the from the table.
Chkind does not automatically run in the background.
In the event that the system or chkind should crash, you may
need to clean up some of the files that chkind was using. The
files to remove are files with a temporary filename, typically of the
* and indexName
indexName is the name of the index. NNNNN is the process ID of
the process that was optimizing (updating) the index: if no such PID
NNNNN exists, it is safe to remove these files, as the process
crashed. Otherwise, these files are in use; leave them alone. This
information is also in other index files, so they are safe to delete
(when the process has died). The rest of the characters have the
usual Unix shell wildcard meaning. Once these files have been removed
it should be possible to restart chkind and the index will be
updated as normal. Note that it is likely that rmlocks will
also need to be run if there was a system crash.
run chkind in the foreground
run chkind in the background
chkind /usr/local/morph3/texis/testdb &