Skip to content

Commit 139fbb0

Browse files
committed
Merge branch 'release-8.5' into feature/preview-v8.5.4
2 parents f55ec5b + 195ca69 commit 139fbb0

File tree

1 file changed

+22
-21
lines changed

1 file changed

+22
-21
lines changed

sql-statements/sql-statement-show-stats-meta.md

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,17 @@ summary: An overview of the usage of SHOW STATS_META for TiDB database.
77

88
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.
99

10-
Currently, the `SHOW STATS_META` statement outputs 6 columns:
10+
Currently, the `SHOW STATS_META` statement outputs the following columns:
1111

1212
| Column name | Description |
1313
| -------- | ------------- |
14-
| db_name | Database name |
15-
| table_name | Table name |
16-
| partition_name| Partition name |
17-
| update_time | Last updated time |
18-
| modify_count | The number of rows modified |
19-
| row_count | The total row count |
14+
| Db_name | Database name |
15+
| Table_name | Table name |
16+
| Partition_name| Partition name |
17+
| Update_time | Last updated time |
18+
| Modify_count | The number of rows modified |
19+
| Row_count | The total row count |
20+
| Last_analyze_time | The last time the table is analyzed |
2021

2122
> **Note:**
2223
>
@@ -40,15 +41,15 @@ SHOW STATS_META;
4041
```
4142

4243
```sql
43-
+---------+------------+----------------+---------------------+--------------+-----------+
44-
| Db_name | Table_name | Partition_name | Update_time | Modify_count | Row_count |
45-
+---------+------------+----------------+---------------------+--------------+-----------+
46-
| test | t0 | | 2020-05-15 16:58:00 | 0 | 0 |
47-
| test | t1 | | 2020-05-15 16:58:04 | 0 | 0 |
48-
| test | t2 | | 2020-05-15 16:58:11 | 0 | 0 |
49-
| test | s | | 2020-05-22 19:46:43 | 0 | 0 |
50-
| test | t | | 2020-05-25 12:04:21 | 0 | 0 |
51-
+---------+------------+----------------+---------------------+--------------+-----------+
44+
+---------+------------+----------------+---------------------+--------------+-----------+---------------------+
45+
| Db_name | Table_name | Partition_name | Update_time | Modify_count | Row_count | Last_analyze_time |
46+
+---------+------------+----------------+---------------------+--------------+-----------+---------------------+
47+
| test | t0 | | 2025-07-27 16:58:00 | 0 | 0 | 2025-07-27 16:58:00 |
48+
| test | t1 | | 2025-07-27 16:58:04 | 0 | 0 | 2025-07-27 16:58:04 |
49+
| test | t2 | | 2025-07-27 16:58:11 | 0 | 0 | 2025-07-27 16:58:11 |
50+
| test | s | | 2025-07-27 19:46:43 | 0 | 0 | 2025-07-27 19:46:43 |
51+
| test | t | | 2025-07-27 12:04:21 | 0 | 0 | 2025-07-27 12:04:21 |
52+
+---------+------------+----------------+---------------------+--------------+-----------+---------------------+
5253
5 rows in set (0.00 sec)
5354
```
5455

@@ -57,11 +58,11 @@ SHOW STATS_META WHERE table_name = 't2';
5758
```
5859

5960
```sql
60-
+---------+------------+----------------+---------------------+--------------+-----------+
61-
| Db_name | Table_name | Partition_name | Update_time | Modify_count | Row_count |
62-
+---------+------------+----------------+---------------------+--------------+-----------+
63-
| test | t2 | | 2020-05-15 16:58:11 | 0 | 0 |
64-
+---------+------------+----------------+---------------------+--------------+-----------+
61+
+---------+------------+----------------+---------------------+--------------+-----------+---------------------+
62+
| Db_name | Table_name | Partition_name | Update_time | Modify_count | Row_count | Last_analyze_time |
63+
+---------+------------+----------------+---------------------+--------------+-----------+---------------------+
64+
| test | t2 | | 2025-07-27 16:58:11 | 0 | 0 | 2025-07-27 16:58:11 |
65+
+---------+------------+----------------+---------------------+--------------+-----------+---------------------+
6566
1 row in set (0.00 sec)
6667
```
6768

0 commit comments

Comments
 (0)