SHOW RULES USED STORAGE UNIT
描述
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
相关链接
当前内容版权归 ShardingSphere 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 ShardingSphere .