CREATE DEFAULT SHARDING STRATEGY
- When using the complex sharding algorithm, multiple sharding columns need to be specified using
SHARDING_COLUMNS
; algorithmType
is the sharding algorithm type. For detailed sharding algorithm type information, please refer to .
- create a default sharding table strategy
CREATE DEFAULT SHARDING TABLE STRATEGY (
TYPE="standard", SHARDING_COLUMN=user_id, SHARDING_ALGORITHM(TYPE(NAME="inline", PROPERTIES("algorithm-expression"="t_order_${user_id % 2}")))
CREATE
, DEFAULT
, SHARDING
, DATABASE
, TABLE
, , TYPE
, SHARDING_COLUMN
, SHARDING_COLUMNS
, SHARDING_ALGORITHM
, NAME
,