ALTER-COLOCATE-GROUP
ALTER-COLOCATE-GROUP
Name
ALTER COLOCATE GROUP
Description
This statement is used to modify the colocation group.
Syntax:
ALTER COLOCATE GROUP [database.]group
SET (
property_list
);
NOTE:
If the colocate group is global, that is, its name starts with
__global__
, then it does not belong to any database;property_list is a colocation group attribute, currently only supports modifying
replication_num
andreplication_allocation
. After modifying these two attributes of the colocation group, at the same time, change the attributedefault.replication_allocation
, the attributedynamic.replication_allocation
of the table of the group, and thereplication_allocation
of the existing partition to be the same as it.
Example
Modify the number of copies of a global group
# Set "colocate_with" = "__global__foo" when creating the table
ALTER COLOCATE GROUP __global__foo
SET (
"replication_num"="1"
);Modify the number of copies of a non-global group
# Set "colocate_with" = "bar" when creating the table, and the Database is "example_db"
ALTER COLOCATE GROUP example_db.bar
SET (
"replication_num"="1"
);
Keywords
ALTER, COLOCATE, GROUP