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

  1. ShowRulesUsedStorageUnit ::=
  2. 'SHOW' 'RULES' 'USED' 'STORAGE' 'UNIT' storageUnitName ('FROM' databaseName)?
  3. storageUnitName ::=
  4. identifier
  5. databaseName ::=
  6. identifier

Return Value Description

ColumnsDescription
typerule type
namerule 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
  1. SHOW RULES USED STORAGE UNIT ds_1 FROM sharding_db;
  1. mysql> SHOW RULES USED STORAGE UNIT ds_1 FROM sharding_db;
  2. +---------------------+------------+
  3. | type | name |
  4. +---------------------+------------+
  5. | readwrite_splitting | ms_group_0 |
  6. | readwrite_splitting | ms_group_0 |
  7. +---------------------+------------+
  8. 2 rows in set (0.01 sec)
  • Query the rules for using the specified storage unit in current database
  1. SHOW RULES USED STORAGE UNIT ds_1;
  1. mysql> SHOW RULES USED STORAGE UNIT ds_1;
  2. +---------------------+------------+
  3. | type | name |
  4. +---------------------+------------+
  5. | readwrite_splitting | ms_group_0 |
  6. | readwrite_splitting | ms_group_0 |
  7. +---------------------+------------+
  8. 2 rows in set (0.01 sec)

Reserved word

SHOW, RULES, USED, STORAGE, UNIT, FROM