SHOW RULES USED STORAGE UNIT
Description
The SHOW RULES USED STORAGE UNIT
syntax is used to query the rules for using the specified storage unit in specified database.
Syntax
Grammar Railroad diagram
ShowRulesUsedStorageUnit ::=
'SHOW' 'RULES' 'USED' 'STORAGE' 'UNIT' storageUnitName ('FROM' databaseName)?
storageUnitName ::=
identifier
databaseName ::=
identifier
Return Value Description
Columns | Description |
---|---|
type | rule type |
name | rule name |
Supplement
- When
databaseName
is not specified, the default is the currently usedDATABASE
. IfDATABASE
is not used,No database selected
will 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 |
| readwrite_splitting | ms_group_0 |
+---------------------+------------+
2 rows 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 |
| readwrite_splitting | ms_group_0 |
+---------------------+------------+
2 rows in set (0.01 sec)
Reserved word
SHOW
, RULES
, USED
, STORAGE
, UNIT
, FROM
Related links
当前内容版权归 ShardingSphere 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 ShardingSphere .