SHOW SHARDING TABLE RULES USED KEY GENERATOR
syntax is used to query sharding rules used specified sharding key generator in specified logical database
ShowShardingTableRulesUsedKeyGenerator::=
'SHOW' 'SHARDING' 'TABLE' 'RULES' 'USED' 'KEY' 'GENERATOR' keyGeneratorName ('FROM' databaseName)?
keyGeneratorName ::=
identifier
databaseName ::=
identifier
Columns | Descriptions |
---|---|
type | Sharding rule type |
name | Sharding rule name |
SHOW SHARDING TABLE RULES USED KEY GENERATOR snowflake_key_generator FROM sharding_db;
mysql> SHOW SHARDING TABLE RULES USED KEY GENERATOR snowflake_key_generator FROM sharding_db;
+-------+--------------+
| type | name |
+-------+--------------+
| table | t_order_item |
+-------+--------------+
1 row in set (0.00 sec)
SHOW SHARDING TABLE RULES USED KEY GENERATOR snowflake_key_generator;
mysql> SHOW SHARDING TABLE RULES USED KEY GENERATOR snowflake_key_generator;
+-------+--------------+
| type | name |
+-------+--------------+
| table | t_order_item |
+-------+--------------+
1 row in set (0.01 sec)
SHOW
, SHARDING
, TABLE
, USED
, KEY
, GENERATOR
, FROM