ALTER DEFAULT SHARDING STRATEGY
- 当使用复合分片算法时,需要通过
SHARDING_COLUMNS
指定多个分片键;
- 修改默认分表策略
ALTER DEFAULT SHARDING TABLE STRATEGY (
TYPE="standard", SHARDING_COLUMN=user_id, SHARDING_ALGORITHM(TYPE(NAME=inline, PROPERTIES("algorithm-expression"="t_order_${user_id % 2}")))