Retro Eye care Haitian Deep Dark Default

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

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 used DATABASE. If DATABASE 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