ALTER-COLOCATE-GROUP
Name
ALTER COLOCATE GROUP
SinceVersion dev
Description
This statement is used to modify the colocation group.
Syntax:
1. ALTER COLOCATE GROUP [database.]group
2. SET (
3. property_list
4. );
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_numandreplication_allocation. After modifying these two attributes of the colocation group, at the same time, change the attributedefault.replication_allocation, the attributedynamic.replication_allocationof the table of the group, and thereplication_allocationof the existing partition to be the same as it.
Example
- Modify the number of copies of a global group
``` 1. # 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
``` 1. # 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
1. ALTER, COLOCATE, GROUP
