ALTER TABLE SYMBOL CAPACITY
Changes the capacity of an existing SYMBOL column in a table.
The capacity of the SYMBOL column is altered without rewriting the data already stored in the table partitions. This operation allows you to adjust the maximum number of distinct values that can be stored in a SYMBOL column without the overhead of rebuilding the entire table.
Syntax
ALTER TABLE tableName ALTER COLUMN columnName SYMBOL CAPACITY capacity;
Examples
Change the capacity of the SYMBOL column counterparty in table fx_trades
to 512:
ALTER TABLE fx_trades ALTER COLUMN counterparty SYMBOL CAPACITY 512;
Notes
- The operation does not rewrite existing data in partitions, making it an efficient way to adjust SYMBOL column configurations.
- The new capacity value must be a positive integer.
- The specified capacity will be automatically rounded to the next power of two.
- If you need to both change the data type and capacity, refer to the ALTER TABLE COLUMN TYPE documentation.