The SHOW RULES USED STORAGE UNIT
syntax is used to query the rules for using the specified storage unit in specified database.
ShowRulesUsedStorageUnit ::=
'SHOW' 'RULES' 'USED' 'STORAGE' 'UNIT' storageUnitName ('FROM' databaseName)?
storageUnitName ::=
identifier
databaseName ::=
identifier
Columns | Description |
---|---|
type | rule type |
name | rule name |
databaseName
is not specified, the default is the currently used DATABASE
. If DATABASE
is not used, No database selected
will be prompted.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