SHOW-TABLE-STATS
Name
SinceVersion 2.0
SHOW TABLE STATS
Description
Use SHOW TABLE STATS to view an overview of statistics collection for a table.
Syntax:
1. SHOW TABLE STATS table_name;
Where:
- table_name: The target table name. It can be in the format
db_name.table_name.
Output:
| Column Name | Description |
|---|---|
updated_rows |
Updated rows since the last ANALYZE |
query_times |
Reserved column for recording the number of times the table was queried in future versions |
row_count |
Number of rows (does not reflect the exact number of rows at the time of command execution) |
updated_time |
Last update time |
columns |
Columns for which statistics information has been collected |
Here’s an example:
1. mysql> show table stats lineitem \G;
2. *************************** 1. row ***************************
3. updated_rows: 0
4. query_times: 0
5. row_count: 6001215
6. updated_time: 2023-11-07
7. columns: [l_returnflag, l_receiptdate, l_tax, l_shipmode, l_suppkey, l_shipdate, l_commitdate, l_partkey, l_orderkey, l_quantity, l_linestatus, l_comment, l_extendedprice, l_linenumber, l_discount, l_shipinstruct]
8. trigger: MANUAL
Keywords
SHOW, TABLE, STATS
