Was this helpful?
MODIFY...TO MERGE
The meaning of the MERGE keyword depends on the context: MERGE can shrink a btree index or can merge one or more partitions into fewer partitions. The latter option requires the WITH PARTITION clause.
Syntax to reorganize a btree table's index:
MODIFY tablename|indexname TO MERGE
When data is added to a btree table, the index automatically expands. However, a btree index does not shrink when rows are deleted from the btree table. MODIFY...TO MERGE to shrink a btree index affects only the index, and therefore usually runs faster than the other modify variants. This type of MODIFY...TO MERGE does not require any temporary disk space to execute.
For information on using MERGE to merge partitions, see MODIFY...PARTITION...TO MERGE.
Last modified date: 11/28/2023