SHOW DATA

Description

This statement is used to show the amount of data, the number of replica and num of rows.

Syntax:

  1. SHOW DATA [FROM db_name[.table_name]];

Explain:

  1. 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.

  2. 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.

  3. When counting the number of rows, the replica with the largest number of rows among multiple replicas shall prevail.

  4. The Total row in the result set represents the summary row. The Quota row indicates the current quota of the database. The Left line indicates the remaining quota.

example

  1. Display the data volume, replica size, aggregate data volume and aggregate replica count of each table of default DB.

    1. SHOW DATA;
    1. +-----------+-------------+--------------+
    2. | TableName | Size | ReplicaCount |
    3. +-----------+-------------+--------------+
    4. | tbl1 | 900.000 B | 6 |
    5. | tbl2 | 500.000 B | 3 |
    6. | Total | 1.400 KB | 9 |
    7. | Quota | 1024.000 GB | 1073741824 |
    8. | Left | 1021.921 GB | 1073741815 |
    9. +-----------+-------------+--------------+
  2. Display the subdivision data volume, replica count and number of rows of the specified table below the specified DB.

    1. SHOW DATA FROM example_db.test;
    2. +-----------+-----------+-----------+--------------+----------+
    3. | TableName | IndexName | Size | ReplicaCount | RowCount |
    4. +-----------+-----------+-----------+--------------+----------+
    5. | test | r1 | 10.000MB | 30 | 10000 |
    6. | | r2 | 20.000MB | 30 | 20000 |
    7. | | test2 | 50.000MB | 30 | 50000 |
    8. | | Total | 80.000 | 90 | |
    9. +-----------+-----------+-----------+--------------+----------+

keyword

  1. SHOW,DATA