User can see the row count of all materialized indexes of a table. ``` mysql> show data from test; +-----------+-----------+-----------+--------------+----------+ | TableName | IndexName | Size | ReplicaCount | RowCount | +-----------+-----------+-----------+--------------+----------+ | test2 | r1 | 10.000MB | 30 | 10000 | | | r2 | 20.000MB | 30 | 20000 | | | test2 | 50.000MB | 30 | 50000 | | | Total | 80.000 | 90 | | +-----------+-----------+-----------+--------------+----------+ ``` Fix #3675
3.3 KiB
title, language
| title | language |
|---|---|
| SHOW DATA | en |
SHOW DATA
Description
This statement is used to show the amount of data, the number of replica and num of rows.
Syntax:
SHOW DATA [FROM db_name[.table_name]];
Explain:
-
If the FROM clause is not specified, the amount of data and the number of copies subdivided into each table under the current db are displayed. The data volume is the total data volume of all replicas. The number of replicas is of all partitions of the table and all materialized views.
-
If the FROM clause is specified, the amount of data, the number of replicas, and the number of statistical rows subdivided into individual materialized views under table are displayed. The data volume is the total data volume of all replicas. The number of replicas is corresponding to all partitions of the materialized view. The number of statistical rows is corresponding to all partitions of the materialized view.
-
When counting the number of rows, the replica with the largest number of rows among multiple replicas shall prevail.
-
The
Totalrow in the result set represents the summary row. TheQuotarow indicates the current quota of the database. TheLeftline indicates the remaining quota.
example
-
Display the data volume, replica size, aggregate data volume and aggregate replica count of each table of default DB.
SHOW DATA;+-----------+-------------+--------------+ | TableName | Size | ReplicaCount | +-----------+-------------+--------------+ | tbl1 | 900.000 B | 6 | | tbl2 | 500.000 B | 3 | | Total | 1.400 KB | 9 | | Quota | 1024.000 GB | 1073741824 | | Left | 1021.921 GB | 1073741815 | +-----------+-------------+--------------+ -
Display the subdivision data volume, replica count and number of rows of the specified table below the specified DB.
SHOW DATA FROM example_db.test; +-----------+-----------+-----------+--------------+----------+ | TableName | IndexName | Size | ReplicaCount | RowCount | +-----------+-----------+-----------+--------------+----------+ | test | r1 | 10.000MB | 30 | 10000 | | | r2 | 20.000MB | 30 | 20000 | | | test2 | 50.000MB | 30 | 50000 | | | Total | 80.000 | 90 | | +-----------+-----------+-----------+--------------+----------+
keyword
SHOW,DATA