SHOW RULES USED STORAGE UNIT
Description
The SHOW RULES USED STORAGE UNIT syntax is used to query the rules that use the specified storage unit in the specified database.
Syntax
ShowRulesUsedStorageUnit ::=
'SHOW' 'RULES' 'USED' 'STORAGE' 'UNIT' storageUnitName ('FROM' databaseName)?
storageUnitName ::=
identifier
databaseName ::=
identifierReturn Value Description
| Columns | Description |
|---|---|
| type | rule type |
| name | rule name |
Supplement
- When
databaseNameis not specified, the default is the currently usedDATABASE. IfDATABASEis not used,No database selectedwill be prompted.
Example
- Query the rules for using the specified storage unit in specified database
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 |
+---------------------+------------+
1 row in set (0.01 sec)- Query the rules for using the specified storage unit in current database
SHOW RULES USED STORAGE UNIT ds_1;mysql> SHOW RULES USED STORAGE UNIT ds_1;
+---------------------+------------+
| type | name |
+---------------------+------------+
| readwrite_splitting | ms_group_0 |
+---------------------+------------+
1 row in set (0.01 sec)Reserved word
SHOW, RULES, USED, STORAGE, UNIT, FROM