SHOW RULES USED STORAGE UNIT
语法用于查询指定逻辑库中使用指定存储单元的规则。
ShowRulesUsedStorageUnit ::=
'SHOW' 'RULES' 'USED' 'STORAGE' 'UNIT' storageUnitName ('FROM' databaseName)?
storageUnitName ::=
identifier
databaseName ::=
identifier
列 | 说明 |
---|---|
type | 规则类型 |
name | 规则名称 |
databaseName
时,默认是当前使用的 DATABASE。
如果也未使用 DATABASE
则会提示 No database selected
。SHOW RULES USED STORAGE UNIT ds_1 FROM sharding_db;
mysql> SHOW RULES USED STORAGE UNIT ds_1 FROM sharding_db;
+---------------------+------------+
| type | name |
+---------------------+------------+
| readwrite_splitting | ms_group_0 |
| readwrite_splitting | ms_group_0 |
+---------------------+------------+
2 rows in set (0.01 sec)
SHOW RULES USED STORAGE UNIT ds_1;
mysql> SHOW RULES USED STORAGE UNIT ds_1;
+---------------------+------------+
| type | name |
+---------------------+------------+
| readwrite_splitting | ms_group_0 |
| readwrite_splitting | ms_group_0 |
+---------------------+------------+
2 rows in set (0.01 sec)
SHOW
、RULES
、USED
、STORAGE
、UNIT
、FROM