Sharding Table #
Syntax | Description | Type |
---|---|---|
CREATE SHARDING TABLE RULE shardingTableRuleDefinition [, shardingTableRuleDefinition] … | Create sharding rule | RDL |
ALTER SHARDING TABLE RULE shardingTableRuleDefinition [, shardingTableRuleDefinition] … | Modify sharding rule | RDL |
DROP SHARDING TABLE RULE tableName [, tableName] … | Delete sharding rule | RDL |
SHOW SHARDING TABLE tableRule RULES [FROM databaseName] | View sharding rule | RQL |
SHOW SHARDING TABLE NODES | View the sharding rules where the sharding table in the logic database is located | RQL |
COUNT SHARDING RULE | Count the number of sharding rules, this syntax will be deprecated in subsequent versions | RQL |
DROP SHARDING ALGORITHM algorithmName [, algorithmName] … | Deleting sharding algorithms individually cannot delete in used algorithms | RDL |
SHOW SHARDING ALGORITHMS [FROM databaseName] | View sharding algorithm details | RQL |
SHOW UNUSED SHARDING ALGORITHMS [FROM databaseName] | View unused sharding algorithms | RQL |
SHOW SHARDING TABLE RULES USED ALGORITHM shardingAlgorithmName [FROM databaseName] | View tables using the specified sharding algorithm | RQL |
DROP SHARDING KEY GENERATOR [IF EXISTS] keyGeneratorName [, keyGeneratorName] … | Delete the distributed primary key generation algorithm | RDL |
SHOW SHARDING KEY GENERATORS [FROM databaseName] | View unused distributed primary key generation algorithm | RQL |
SHOW UNUSED SHARDING KEY GENERATORS [FROM databaseName] | View unused distributed primary key generation algorithm | RQL |
SHOW SHARDING TABLE RULES USED KEY GENERATOR keyGeneratorName [FROM databaseName] | View tables using the specified algorithm | RQL |
CREATE DEFAULT SHARDING shardingScope STRATEGY (shardingStrategy) | Create default sharding strategy for the specified sharding scope | RDL |
ALTER DEFAULT SHARDING shardingScope STRATEGY (shardingStrategy) | Modify default sharding strategy for the specified sharding scope | RDL |
DROP DEFAULT SHARDING shardingScope STRATEGY | Delete default sharding strategy for the specified sharding scope | RDL |
SHOW DEFAULT SHARDING STRATEGY | View details of the default sharding strategy | RQL |
SHOW AUTO_RESHARDING (STRATEGY tableName \ | STRATEGIES) | View details of auto-resharding strategy |
CREATE DEFAULT AUTO_RESHARDING STRATEGY | Create default auto-resharding strategy | RDL |
ALTER DEFAULT AUTO_RESHARDING STRATEGY | Modify default auto-resharding strategy | RDL |
DROP DEFAULT AUTO_RESHARDING STRATEGY | Delete default auto-resharding strategy | RDL |
SHOW DEFAULT AUTO_RESHARDING STRATEGY | View details of the default auto-resharding strategy | RQL |
1. Create Sharding Rule #
CREATE SHARDING TABLE RULE shardingTableRuleDefinition [, shardingTableRuleDefinition] ...
shardingTableRuleDefinition:
shardingAutoTableRule | shardingTableRule
shardingAutoTableRule:
tableName(storageUnits, shardingColumn, algorithmDefinition [, keyGenerateDefinition] [, auditDeclaration])
shardingTableRule:
tableName(dataNodes [, databaseStrategy] [, tableStrategy] [, keyGenerateDefinition] [, auditDeclaration])
storageUnits:
STORAGE_UNITS(storageUnit [, storageUnit] ...)
dataNodes:
DATANODES(dataNode [, dataNode] ...)
storageUnit:
storageUnitName | inlineExpression
dataNode:
dataNodeName | inlineExpression
shardingColumn:
SHARDING_COLUMN=columnName
algorithmDefinition:
TYPE(NAME=shardingAlgorithmType [, PROPERTIES([algorithmProperties])])
keyGenerateDefinition:
KEY_GENERATE_STRATEGY(COLUMN=columnName, strategyDefinition)
auditDeclaration:
auditDefinition | auditStrategy
auditDefinition:
AUDIT_STRATEGY([(singleAuditDefinition),(singleAuditDefinition)], ALLOW_HINT_DISABLE=true)
singleAuditDefinition:
NAME=auditor1, algorithmDefinition
auditStrategy:
AUDIT_STRATEGY(AUDITORS=[auditor1,auditor2], ALLOW_HINT_DISABLE=true)
Parameter Explanation
STORAGE_UNITS
needs to use storage units managed by RDLshardingAlgorithmType
specify auto sharding algorithm type, please refer to Auto sharding algorithm;keyGenerateStrategyType
specify key generator strategy, please refer to Key generator;auditorAlgorithmType
specify sharding audit strategy, please refer to Sharding audit;- Duplicate
tableName
will not be created shardingAlgorithm
can be reused by differentSharding Table Rule
, so when executingDROP SHARDING TABLE RULE
, the correspondingshardingAlgorithm
will not be removed- To remove
shardingAlgorithm
, please executeDROP SHARDING ALGORITHM
- The algorithm naming rule automatically generated after creating the sharding rule is tableName _ strategyType _ algorithmType;
- The naming rule of the primary key strategy automatically generated after creating the sharding rule is tableName _ `strategyType;
Sharding Table Rule
supports bothAuto Table
andTable
at the same time. The two types are different in syntax.- executing
CREATE SHARDING TABLE RULE
,a new sharding algorithm will be created automatically. The algorithm naming rule istableName_scope_shardingAlgorithmType
,such ast_order_database_inline
- When
DATABASE_STRATEGY
is “NONE”, no sharding database strategy
Example
Create sharding table rule use default sharding database strategy
CREATE SHARDING TABLE RULE t_order (
STORAGE_UNITS(ds_0,ds_1),
SHARDING_COLUMN=order_id,TYPE(NAME="hash_mod",PROPERTIES("sharding-count"="4")),
KEY_GENERATE_STRATEGY(COLUMN=another_id,TYPE(NAME="snowflake"))
);
Create sharding table rule with none sharding database strategy
CREATE SHARDING TABLE RULE t_item (
DATANODES("ds_0.t_item_${0..1}"),
DATABASE_STRATEGY(TYPE="NONE"),
TABLE_STRATEGY(TYPE="standard",SHARDING_COLUMN=order_id,SHARDING_ALGORITHM(TYPE(NAME="inline",PROPERTIES("algorithm-expression"="t_item_${order_id % 2}"))))
);
2. Modify Sharding Rule #
ALTER SHARDING TABLE RULE shardingTableRuleDefinition [, shardingTableRuleDefinition] ...
shardingTableRuleDefinition:
shardingAutoTableRule | shardingTableRule
shardingAutoTableRule:
tableName(storageUnits, shardingColumn, algorithmDefinition [, keyGenerateDefinition] [, auditDeclaration])
shardingTableRule:
tableName(dataNodes [, databaseStrategy] [, tableStrategy] [, keyGenerateDefinition] [, auditDeclaration])
storageUnits:
STORAGE_UNITS(storageUnit [, storageUnit] ...)
dataNodes:
DATANODES(dataNode [, dataNode] ...)
storageUnit:
storageUnitName | inlineExpression
dataNode:
dataNodeName | inlineExpression
shardingColumn:
SHARDING_COLUMN=columnName
algorithmDefinition:
TYPE(NAME=shardingAlgorithmType [, PROPERTIES([algorithmProperties])])
keyGenerateDefinition:
KEY_GENERATE_STRATEGY(COLUMN=columnName, strategyDefinition)
auditDeclaration:
auditDefinition | auditStrategy
auditDefinition:
AUDIT_STRATEGY([(singleAuditDefinition),(singleAuditDefinition)], ALLOW_HINT_DISABLE=true)
singleAuditDefinition:
NAME=auditor1, algorithmDefinition
auditStrategy:
AUDIT_STRATEGY(AUDITORS=[auditor1,auditor2], ALLOW_HINT_DISABLE=true)
Parameter Explanation
STORAGE_UNITS
needs to use storage units managed by RDLshardingAlgorithmType
specify auto sharding algorithm type, please refer to Auto sharding algorithm;keyGenerateStrategyType
specify key generator strategy, please refer to Key generator;auditorAlgorithmType
specify sharding audit strategy, please refer to Sharding audit;- Duplicate
tableName
will not be created shardingAlgorithm
can be reused by differentSharding Table Rule
, so when executingDROP SHARDING TABLE RULE
, the correspondingshardingAlgorithm
will not be removed- To remove
shardingAlgorithm
, please executeDROP SHARDING ALGORITHM
- The algorithm naming rule automatically generated after creating the sharding rule is tableName _ strategyType _ algorithmType;
- The naming rule of the primary key strategy automatically generated after creating the sharding rule is tableName _ `strategyType;
Sharding Table Rule
supports bothAuto Table
andTable
at the same time. The two types are different in syntax.- executing
CREATE SHARDING TABLE RULE
,a new sharding algorithm will be created automatically. The algorithm naming rule istableName_scope_shardingAlgorithmType
,such ast_order_database_inline
- When
DATABASE_STRATEGY
is “NONE”, no sharding database strategy
Example
ALTER SHARDING TABLE RULE t_order (
STORAGE_UNITS(ds_0,ds_1,ds_2,ds_3),
SHARDING_COLUMN=order_id,TYPE(NAME="hash_mod",PROPERTIES("sharding-count"="16")),
KEY_GENERATE_STRATEGY(COLUMN=another_id,TYPE(NAME="snowflake"))
);
3. Delete Sharding Rule #
DROP SHARDING TABLE RULE t_order_item;
Example
Delete sharding rule named t_order_item
DROP SHARDING TABLE RULE t_order_item;
4. View Sharding rule #
SHOW SHARDING TABLE tableRule | RULES [FROM databaseName]
Example
View all sharding table rule in logical database
mysql> SHOW SHARDING TABLE RULES;
+--------------+---------------------------------+-------------------+----------------------+------------------------+-------------------------------+----------------------------------------+-------------------+---------------------+----------------------------+---------------------------------------------------+-------------------+------------------+-------------------+
| table | actual_data_nodes | actual_data_sources | database_strategy_type | database_sharding_column | database_sharding_algorithm_type | database_sharding_algorithm_props | table_strategy_type | table_sharding_column | table_sharding_algorithm_type | table_sharding_algorithm_props | key_generate_column | key_generator_type | key_generator_props | auditor_types | allow_hint_disable |+--------------+---------------------------------+-------------------+----------------------+------------------------+-------------------------------+----------------------------------------+-------------------+---------------------+----------------------------+---------------------------------------------------+-------------------+------------------+-------------------+
| t_order | ds_${0..1}.t_order_${0..1} | | INLINE | user_id | INLINE | algorithm-expression:ds_${user_id % 2} | INLINE | order_id | INLINE | algorithm-expression:t_order_${order_id % 2} | order_id | SNOWFLAKE | | DML_SHARDING_CONDITIONS |true || t_order_item | ds_${0..1}.t_order_item_${0..1} | | INLINE | user_id | INLINE | algorithm-expression:ds_${user_id % 2} | INLINE | order_id | INLINE | algorithm-expression:t_order_item_${order_id % 2} | order_item_id | SNOWFLAKE | | | || t2 | | ds_0,ds_1 | | | | | mod | id | mod | sharding-count:10 | | | | | |+--------------+---------------------------------+-------------------+----------------------+------------------------+-------------------------------+----------------------------------------+-------------------+---------------------+----------------------------+---------------------------------------------------+-------------------+------------------+-------------------+
3 rows in set (0.02 sec)
View specified sharding table rule in logical database
mysql> SHOW SHARDING TABLE RULE t_order;
+---------+----------------------------+-------------------+----------------------+------------------------+-------------------------------+----------------------------------------+-------------------+---------------------+----------------------------+----------------------------------------------+-------------------+------------------+-------------------+
| table | actual_data_nodes | actual_data_sources | database_strategy_type | database_sharding_column | database_sharding_algorithm_type | database_sharding_algorithm_props | table_strategy_type | table_sharding_column | table_sharding_algorithm_type | table_sharding_algorithm_props | key_generate_column | key_generator_type | key_generator_props | auditor_types | allow_hint_disable |+---------+----------------------------+-------------------+----------------------+------------------------+-------------------------------+----------------------------------------+-------------------+---------------------+----------------------------+----------------------------------------------+-------------------+------------------+-------------------+
| t_order | ds_${0..1}.t_order_${0..1} | | INLINE | user_id | INLINE | algorithm-expression:ds_${user_id % 2} | INLINE | order_id | INLINE | algorithm-expression:t_order_${order_id % 2} | order_id | SNOWFLAKE | | DML_SHARDING_CONDITIONS |true |
+---------+----------------------------+-------------------+----------------------+------------------------+-------------------------------+----------------------------------------+-------------------+---------------------+----------------------------+----------------------------------------------+-------------------+------------------+-------------------+
1 row in set (0.01 sec)
Output Description
Column | Description |
---|---|
table | Logical table name |
actual_data_nodes | Actual data node |
actual_data_sources | Actual data source (Displayed when creating rules by RDL) |
database_strategy_type | Database sharding strategy type |
database_sharding_column | Database sharding column |
database_sharding_algorithm_type | Database sharding algorithm type |
database_sharding_algorithm_props | Database sharding algorithm properties |
table_strategy_type | Table sharding strategy type |
table_sharding_column | Table sharding column |
table_sharding_algorithm_type | Table sharding algorithm type |
table_sharding_algorithm_props | Table sharding algorithm properties |
key_generate_column | Sharding key generator column |
key_generator_type | Sharding key generator type |
key_generator_props | Sharding key generator properties |
auditor_types | Sharding auditor types |
allow_hint_disable | Enable or disable sharding audit hint |
5. View the sharding rules where the sharding table in the logic database is located #
SHOW SHARDING TABLE NODES;
Parameter Explanation
None
Example
mysql> SHOW SHARDING TABLE NODES;
+---------+----------------------------------------------------------------+
| name | nodes |
+---------+----------------------------------------------------------------+
| t_order | ds_0.t_order_0, ds_1.t_order_1, ds_0.t_order_2, ds_1.t_order_3 |
+---------+----------------------------------------------------------------+
1 row in set (0.02 sec)
Output Description
Column | Description |
---|---|
name | Sharding rule name |
nodes | Sharding nodes |
6. Individually Delete The Sharding Algorithm #
DROP SHARDING ALGORITHM algorithmName [, algorithmName] ...
Example
Delete sharding algorithm named t_order_hash_mod
DROP SHARDING ALGORITHM t_order_hash_mod;
7. View Detail Of Sharding Algorithms #
SHOW SHARDING ALGORITHMS;
Parameter Explanation
None
Example
mysql> SHOW SHARDING ALGORITHMS;
+-------------------------+--------+-----------------------------------------------------+
| name | type | props |+-------------------------+--------+-----------------------------------------------------+
| t_order_inline | INLINE | algorithm-expression=t_order_${order_id % 2} || t_order_item_inline | INLINE | algorithm-expression=t_order_item_${order_id % 2} |+-------------------------+--------+-----------------------------------------------------+
2 row in set (0.01 sec)
Output Description
Column | Description |
---|---|
name | Sharding algorithm name |
type | Sharding algorithm type |
props | Sharding algorithm properties |
8. View Unused Sharding Algorithm #
SHOW UNUSED SHARDING ALGORITHMS;
Parameter Explanation
None
Example
mysql> SHOW UNUSED SHARDING ALGORITHMS;
+---------------+--------+-----------------------------------------------------+
| name | type | props |+---------------+--------+-----------------------------------------------------+
| t1_inline | INLINE | algorithm-expression=t_order_${order_id % 2} |+---------------+--------+-----------------------------------------------------+
1 row in set (0.01 sec)
Output Description
Column | Description |
---|---|
name | Sharding algorithm name |
type | Sharding algorithm type |
props | Sharding algorithm properties |
9. View Tables Using The Specified Sharding Algorithm #
SHOW SHARDING TABLE RULES USED ALGORITHM shardingAlgorithmName [FROM databaseName]
Example
mysql> SHOW SHARDING TABLE RULES USED ALGORITHM t_order_inline;
+-------+---------+
| type | name |
+-------+---------+
| table | t_order |
1 row in set (0.01 sec)
Output Description
Column | Description |
---|---|
type | Sharding algorithm type |
name | Sharding algorithm name (same as table name) |
10. Delete Distributed Primary Key Generation Algorithm #
DROP SHARDING KEY GENERATOR [IF EXISTS] keyGeneratorName [, keyGeneratorName] ...
Example
DROP SHARDING KEY GENERATOR snowflake_key_generator;
11. View Distributed Primary Key Generation Algorithm #
SHOW SHARDING KEY GENERATORS;
Parameter Explanation
None
Example
mysql> SHOW SHARDING KEY GENERATORS;
+------------------------+-----------+-----------------+
| name | type | props |
+------------------------+-----------+-----------------+
| t_order_snowflake | snowflake | |
| t_order_item_snowflake | snowflake | |
| uuid_key_generator | uuid | |
+------------------------+-----------+-----------------+
3 row in set (0.01 sec)
Output Description
Column | Description |
---|---|
name | Key generator name |
type | Key generator type |
props | Key generator properties |
12. View Unused Key Generation Algorithm #
SHOW UNUSED SHARDING KEY GENERATORS;
Parameter Explanation
None
Example
mysql> SHOW UNUSED SHARDING KEY GENERATORS;
+------------------------+-----------+-----------------+
| name | type | props |
+------------------------+-----------+-----------------+
| dml_audit | uuid | |
+------------------------+-----------+-----------------+
1 row in set (0.01 sec)
Output Description
Column | Description |
---|---|
name | Key generator name |
type | Key generator type |
props | Key generator properties |
13. View Tables Using Specified Key Generation Algorithm #
SHOW SHARDING TABLE RULES USED KEY GENERATOR keyGeneratorName [FROM databaseName]
Example
mysql> SHOW SHARDING TABLE RULES USED KEY GENERATOR t_order_snowflake;
+-------+---------+
| type | name |
+-------+---------+
| table | t_order |
+-------+---------+
1 row in set (0.01 sec)
Output Description
Column | Description |
---|---|
type | Sharding algorithm name(sharding database algorithm or sharding table algorithm) |
name | Sharding rule name |
14. Create Default Sharding Database Sharding Table Strategy #
CREATE DEFAULT SHARDING shardingScope STRATEGY (shardingStrategy)
shardingScope:
DATABASE | TABLE
databaseStrategy:
DATABASE_STRATEGY(shardingStrategy)
tableStrategy:
TABLE_STRATEGY(shardingStrategy)
shardingStrategy:
TYPE=strategyType, shardingColumn, shardingAlgorithm
shardingColumn:
SHARDING_COLUMN=columnName
shardingAlgorithm:
SHARDING_ALGORITHM(algorithmDefinition)
strategyDefinition:
TYPE(NAME=keyGenerateStrategyType [, PROPERTIES([algorithmProperties])])
Parameter Explanation
strategyType
specify sharding strategy;- When execute
CREATE DEFAULT SHARDING STRATEGY
, A new sharding algorithm will also be created automatically, and the algorithm naming rules aredefault_scope_shardingAlgorithmType
, such asdefault_database_inline
.
Example
CREATE DEFAULT SHARDING DATABASE STRATEGY (
TYPE="standard",SHARDING_COLUMN=order_id,SHARDING_ALGORITHM(TYPE(NAME="inline",PROPERTIES("algorithm-expression"="ds_${order_id % 2}")))
);
15. Modify Default Sharding Database Sharding Table Strategy #
ALTER DEFAULT SHARDING shardingScope STRATEGY (shardingStrategy)
shardingScope:
DATABASE | TABLE
databaseStrategy:
DATABASE_STRATEGY(shardingStrategy)
tableStrategy:
TABLE_STRATEGY(shardingStrategy)
shardingStrategy:
TYPE=strategyType, shardingColumn, shardingAlgorithm
shardingColumn:
SHARDING_COLUMN=columnName
shardingAlgorithm:
SHARDING_ALGORITHM(algorithmDefinition)
strategyDefinition:
TYPE(NAME=keyGenerateStrategyType [, PROPERTIES([algorithmProperties])])
Parameter Explanation
strategyType
specify sharding strategy;- When execute
CREATE DEFAULT SHARDING STRATEGY
, A new sharding algorithm will also be created automatically, and the algorithm naming rules aredefault_scope_shardingAlgorithmType
, such asdefault_database_inline
.
Example
ALTER DEFAULT SHARDING DATABASE STRATEGY (
TYPE="standard",SHARDING_COLUMN=order_id,SHARDING_ALGORITHM(TYPE(NAME="inline",PROPERTIES("algorithm-expression"="ds_${order_id % 2}")))
);
16. Delete Default Sharding Database Sharding Table Strategy #
DROP DEFAULT SHARDING shardingScope STRATEGY
shardingScope:
DATABASE | TABLE
Example
DROP DEFAULT SHARDING DATABASE STRATEGY;
17. View Default Sharding Database Sharding Table Strategy #
SHOW DEFAULT SHARDING STRATEGY;
Parameter Explanation
None
Example
mysql> SHOW DEFAULT SHARDING STRATEGY ;
+----------+---------+--------------------+-------------------------+-------------------------+------------------------------------------+
| name | type | sharding_column | sharding_algorithm_name | sharding_algorithm_type | sharding_algorithm_props |
+----------+---------+--------------------+-------------------------+-------------------------+------------------------------------------+
| TABLE | NONE | | | | |
| DATABASE | STANDARD| order_id | database_inline | INLINE | {algorithm-expression=ds_${user_id % 2}} |
+----------+---------+--------------------+-------------------------+-------------------------+------------------------------------------+
2 rows in set (0.07 sec)
Output Description
Column | Description |
---|---|
name | Strategy name |
type | Sharding strategy type |
sharding_column | Sharding key |
sharding_algorithm_name | Sharding algorithm name |
sharding_algorithm_type | Sharding algorithm type |
sharding_algorithm_props | Sharding algorithm properties |
18. View Details of Default Auto-resharding Strategy #
SHOW AUTO_RESHARDING (STRATEGY tableName \| STRATEGIES)
Example
SHOW AUTO_RESHARDING STRATEGIES;
+-----------------------+----------+---------------------------------------------------------------------+------------------------------------+-------------------------------------------+
| table | type | algorithm_name | algorithm_type | algorithm_props |
+-----------------------+----------+---------------------------------------------------------------------+------------------------------------+-------------------------------------------+
| t_order_auto_interval | matching | t_order_auto_interval_matching_interval_upper_time_high_waterline_0 | INTERVAL_UPPER_TIME_HIGH_WATERLINE | remaining-seconds-until-upper-time=864000 |
| t_order_auto_interval | action | t_order_auto_interval_action_scale_sharding | SCALE_SHARDING | amount=30,operation-type=ADD |
+-----------------------+----------+---------------------------------------------------------------------+------------------------------------+-------------------------------------------+
SHOW AUTO_RESHARDING STRATEGY t_order_auto_interval ;
+-----------------------+----------+---------------------------------------------------------------------+------------------------------------+-------------------------------------------+
| table | type | algorithm_name | algorithm_type | algorithm_props |
+-----------------------+----------+---------------------------------------------------------------------+------------------------------------+-------------------------------------------+
| t_order_auto_interval | matching | t_order_auto_interval_matching_interval_upper_time_high_waterline_0 | INTERVAL_UPPER_TIME_HIGH_WATERLINE | remaining-seconds-until-upper-time=864000 |
| t_order_auto_interval | action | t_order_auto_interval_action_scale_sharding | SCALE_SHARDING | amount=30,operation-type=ADD |
+-----------------------+----------+---------------------------------------------------------------------+------------------------------------+-------------------------------------------+
19. Create Default Auto-resharding Strategy #
CREATE DEFAULT AUTO_RESHARDING STRATEGY
Example
CREATE DEFAULT AUTO_RESHARDING STRATEGY(
MATCHING_ALGORITHM(
TYPE(NAME="INTERVAL_UPPER_TIME_HIGH_WATERLINE",PROPERTIES("remaining-seconds-until-upper-time"=86400))
),
ACTION_ALGORITHM(TYPE(NAME="SCALE_SHARDING",PROPERTIES("operation-type"="ADD","amount"=2)))
);
20. Modify Default Auto-resharding Strategy #
ALTER DEFAULT AUTO_RESHARDING STRATEGY
Example
ALTER DEFAULT AUTO_RESHARDING STRATEGY(
MATCHING_ALGORITHM(
TYPE(NAME="INTERVAL_UPPER_TIME_HIGH_WATERLINE",PROPERTIES("remaining-seconds-until-upper-time"=86400))
),
ACTION_ALGORITHM(TYPE(NAME="SCALE_SHARDING",PROPERTIES("operation-type"="ADD","amount"=2)))
);
21. Delete Default Auto-resharding Strategy #
DROP DEFAULT AUTO_RESHARDING STRATEGY
Example
DROP DEFAULT AUTO_RESHARDING STRATEGY;
22. View Details of Default Auto-resharding Strategy #
SHOW DEFAULT AUTO_RESHARDING STRATEGY
SHOW DEFAULT AUTO_RESHARDING STRATEGY;
+----------+---------------------------------------+------------------------------------+------------------------------------------+
| type | algorithm_name | algorithm_type | algorithm_props |
+----------+---------------------------------------+------------------------------------+------------------------------------------+
| matching | default_matching_matching_algorithm_0 | INTERVAL_UPPER_TIME_HIGH_WATERLINE | remaining-seconds-until-upper-time=86400 |
| action | default_action_action_algorithm | SCALE_SHARDING | amount=2,operation-type=ADD |
+----------+---------------------------------------+------------------------------------+------------------------------------------+