Skip to content

ttl deletion is not recorded in the stats #40109

@YangKeao

Description

@YangKeao

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

CREATE TABLE t1(id int, id_2 int, t timestamp, PRIMARY KEY (id, id_2)) TTL=`t` + INTERVAL 1 DAY

Insert 10000 rows,6667 of them expired. After a period of time,run SHOW STATS_META to check whether the stats is updated.

2. What did you expect to see? (Required)

Auto analyze should be triggered

3. What did you see instead (Required)

It's not updated, Modify_count is also not updated.

MySQL [test]> SHOW STATS_META;
+---------+------------+----------------+---------------------+--------------+-----------+
| Db_name | Table_name | Partition_name | Update_time         | Modify_count | Row_count |
+---------+------------+----------------+---------------------+--------------+-----------+
| test    | t1         |                | 2022-12-22 16:03:34 |            0 |     10000 |
+---------+------------+----------------+---------------------+--------------+-----------+
1 row in set (0.001 sec)

4. What is your TiDB version? (Required)

Release Version: v6.6.0-alpha
Edition: Community
Git Commit Hash: fc3f04b
Git Branch: heads/refs/tags/v6.6.0-alpha
UTC Build Time: 2022-12-21 14:38:34
GoVersion: go1.19.3
Race Enabled: false
TiKV Min Version: 6.2.0-alpha
Check Table Before Drop: false
Store: tikv

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions