diff --git a/sql-statements/sql-statement-show-stats-meta.md b/sql-statements/sql-statement-show-stats-meta.md index b2c8f239d5db7..6e77b22002924 100644 --- a/sql-statements/sql-statement-show-stats-meta.md +++ b/sql-statements/sql-statement-show-stats-meta.md @@ -8,16 +8,17 @@ aliases: ['/docs/dev/sql-statements/sql-statement-show-stats-meta/'] You can use `SHOW STATS_META` to view how many rows are in a table and how many rows are changed in that table. When using this statement, you can filter the needed information by the `ShowLikeOrWhere` clause. -Currently, the `SHOW STATS_META` statement outputs 6 columns: +Currently, the `SHOW STATS_META` statement outputs the following columns: | Column name | Description | | -------- | ------------- | -| db_name | Database name | -| table_name | Table name | -| partition_name| Partition name | -| update_time | Last updated time | -| modify_count | The number of rows modified | -| row_count | The total row count | +| Db_name | Database name | +| Table_name | Table name | +| Partition_name| Partition name | +| Update_time | Last updated time | +| Modify_count | The number of rows modified | +| Row_count | The total row count | +| Last_analyze_time | The last time the table is analyzed | > **Note:** > @@ -41,15 +42,15 @@ SHOW STATS_META; ``` ```sql -+---------+------------+----------------+---------------------+--------------+-----------+ -| Db_name | Table_name | Partition_name | Update_time | Modify_count | Row_count | -+---------+------------+----------------+---------------------+--------------+-----------+ -| test | t0 | | 2020-05-15 16:58:00 | 0 | 0 | -| test | t1 | | 2020-05-15 16:58:04 | 0 | 0 | -| test | t2 | | 2020-05-15 16:58:11 | 0 | 0 | -| test | s | | 2020-05-22 19:46:43 | 0 | 0 | -| test | t | | 2020-05-25 12:04:21 | 0 | 0 | -+---------+------------+----------------+---------------------+--------------+-----------+ ++---------+------------+----------------+---------------------+--------------+-----------+---------------------+ +| Db_name | Table_name | Partition_name | Update_time | Modify_count | Row_count | Last_analyze_time | ++---------+------------+----------------+---------------------+--------------+-----------+---------------------+ +| test | t0 | | 2025-07-27 16:58:00 | 0 | 0 | 2025-07-27 16:58:00 | +| test | t1 | | 2025-07-27 16:58:04 | 0 | 0 | 2025-07-27 16:58:04 | +| test | t2 | | 2025-07-27 16:58:11 | 0 | 0 | 2025-07-27 16:58:11 | +| test | s | | 2025-07-27 19:46:43 | 0 | 0 | 2025-07-27 19:46:43 | +| test | t | | 2025-07-27 12:04:21 | 0 | 0 | 2025-07-27 12:04:21 | ++---------+------------+----------------+---------------------+--------------+-----------+---------------------+ 5 rows in set (0.00 sec) ``` @@ -58,11 +59,11 @@ SHOW STATS_META WHERE table_name = 't2'; ``` ```sql -+---------+------------+----------------+---------------------+--------------+-----------+ -| Db_name | Table_name | Partition_name | Update_time | Modify_count | Row_count | -+---------+------------+----------------+---------------------+--------------+-----------+ -| test | t2 | | 2020-05-15 16:58:11 | 0 | 0 | -+---------+------------+----------------+---------------------+--------------+-----------+ ++---------+------------+----------------+---------------------+--------------+-----------+---------------------+ +| Db_name | Table_name | Partition_name | Update_time | Modify_count | Row_count | Last_analyze_time | ++---------+------------+----------------+---------------------+--------------+-----------+---------------------+ +| test | t2 | | 2025-07-27 16:58:11 | 0 | 0 | 2025-07-27 16:58:11 | ++---------+------------+----------------+---------------------+--------------+-----------+---------------------+ 1 row in set (0.00 sec) ```