ALTER TABLE ROLLUP
This statement is used to perform a rollup modification operation on an existing table. The rollup is an asynchronous operation, and the task is returned when the task is submitted successfully. After that, you can use the SHOW ALTER command to view the progress.
grammar:
ALTER TABLE [database.]table alter_clause;
The alter_clause of rollup supports the following creation methods
grammar:
ADD ROLLUP rollup_name (column_name1, column_name2, ...) [FROM from_index_name] [PROPERTIES ("key"="value", ...)]
properties: Support setting timeout time, the default timeout time is 1 day.
grammar:
ADD ROLLUP [rollup_name (column_name1, column_name2, ...) [FROM from_index_name] [PROPERTIES ("key"="value", ...)],...]
Notice:
grammar:
DROP ROLLUP rollup_name [PROPERTIES ("key"="value", ...)]
grammar:
DROP ROLLUP [rollup_name [PROPERTIES ("key"="value", ...)],...]
Notice:
ALTER TABLE example_db.my_table ADD ROLLUP example_rollup_index(k1, k3, v1, v2);
ALTER TABLE example_db.my_table ADD ROLLUP example_rollup_index2 (k1, v1) FROM example_rollup_index;
ALTER TABLE example_db.my_table ADD ROLLUP example_rollup_index(k1, k3, v1) PROPERTIES("timeout" = "3600");
ALTER TABLE example_db.my_table DROP ROLLUP example_rollup_index2;
ALTER TABLE example_db.my_table DROP ROLLUP example_rollup_index2,example_rollup_index3;
ALTER, TABLE, ROLLUP, ALTER TABLE