Product Documentation

VCL/CLX Developers Guide

Previous Topic

Next Topic

Add, edit or delete indexes

By calling one of the following index management functions, the table definition is marked as modified and for the changes to be reflected on the data and index files, you must call AlterTable().

To add a new index to a table call AddIndex(). To delete an existing index call DeleteIndex(). To add, insert or delete index segments from an index call AddSegment(), InsertSegment(), DeleteSegment().

Most changes relating to indexes will trigger the AlterTable() method to perform only an index rebuild. If only one index is affected, ctdbAlterTable() will only rebuild the affected index. If changes affect more than one index, ctdbAlterTable() may rebuild all indexes.

After a successful alter table, all records associated with the altered table will automatically re-initialize to reflect any new table field and index definitions.

TOCIndex