Skip to content

no data change in the table, but auto analyze is trigged many times #51775

@seiya-annie

Description

@seiya-annie

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

  1. execute analyze table
  2. during analyze, drop indexs
  3. after analyze finished, check stats

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

analyze finished successfully

3. What did you see instead (Required)

after analyze finished, auto analyze is trigged many times, but no data change during that time, and no more ddl operations.

mysql> select * from mysql.analyze_jobs;
+-------+---------------------+--------------+------------+----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------+---------------------+---------------------+----------+-------------+---------------------------------------------------------------------------+------------+
| id    | update_time         | table_schema | table_name | partition_name | job_info                                                                                                                                                                                                                                                                          | processed_rows | start_time          | end_time            | state    | fail_reason | instance                                                                  | process_id |
+-------+---------------------+--------------+------------+----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------+---------------------+---------------------+----------+-------------+---------------------------------------------------------------------------+------------+

|    26 | 2024-03-13 19:41:15 | test         | items      |                | analyze table columns -- arrival_time, updated_time with 256 buckets, 500 topn, 0.0007600531585232688 samplerate       |      198000000 | 2024-03-13 18:29:50 | 2024-03-13 19:41:15 | finished | NULL        | tc-tidb-1.tc-tidb-peer.sql-mvindex-40t-testing-tps-7500536-1-617.svc:4000 |       NULL |

|    35 | 2024-03-13 19:49:45 | test         | items      |                | auto analyze table columns --arrival_time, updated_time with 256 buckets, 500 topn, 0.0005555555555555556 samplerate  |      198000000 | 2024-03-13 19:28:23 | 2024-03-13 19:49:45 | finished | NULL        | tc-tidb-1.tc-tidb-peer.sql-mvindex-40t-testing-tps-7500536-1-617.svc:4000 |       NULL |

|    42 | 2024-03-13 21:05:23 | test         | items      |                | auto analyze table columns --arrival_time, updated_time with 256 buckets, 500 topn, 0.0005555555555555556 samplerate  |      198000000 | 2024-03-13 20:44:36 | 2024-03-13 21:05:23 | finished | NULL        | tc-tidb-1.tc-tidb-peer.sql-mvindex-40t-testing-tps-7500536-1-617.svc:4000 |       NULL |

|    49 | 2024-03-13 22:21:02 | test         | items      |                | auto analyze table columns--arrival_time, updated_time with 256 buckets, 500 topn, 0.0005555555555555556 samplerate  |      198000000 | 2024-03-13 22:00:13 | 2024-03-13 22:21:02 | finished | NULL        | tc-tidb-1.tc-tidb-peer.sql-mvindex-40t-testing-tps-7500536-1-617.svc:4000 |       NULL |

|    56 | 2024-03-13 23:36:44 | test         | items      |                | auto analyze table columns --arrival_time, updated_time with 256 buckets, 500 topn, 0.0005555555555555556 samplerate  |      198000000 | 2024-03-13 23:15:54 | 2024-03-13 23:36:44 | finished | NULL        | tc-tidb-1.tc-tidb-peer.sql-mvindex-40t-testing-tps-7500536-1-617.svc:4000 |       NULL |

|    63 | 2024-03-14 00:52:27 | test         | items      |                | auto analyze table columns --arrival_time, updated_time with 256 buckets, 500 topn, 0.0005555555555555556 samplerate  |      198000000 | 2024-03-14 00:31:37 | 2024-03-14 00:52:27 | finished | NULL        | tc-tidb-1.tc-tidb-peer.sql-mvindex-40t-testing-tps-7500536-1-617.svc:4000 |       NULL |

|    70 | 2024-03-14 02:08:12 | test         | items      |                | auto analyze table columns--arrival_time, updated_time with 256 buckets, 500 topn, 0.0005555555555555556 samplerate  |      198000000 | 2024-03-14 01:47:21 | 2024-03-14 02:08:12 | finished | NULL        | tc-tidb-1.tc-tidb-peer.sql-mvindex-40t-testing-tps-7500536-1-617.svc:4000 |       NULL |

|    77 | 2024-03-14 03:23:53 | test         | items      |                | auto analyze table columns --arrival_time, updated_time with 256 buckets, 500 topn, 0.0005555555555555556 samplerate  |      198000000 | 2024-03-14 03:03:03 | 2024-03-14 03:23:53 | finished | NULL        | tc-tidb-1.tc-tidb-peer.sql-mvindex-40t-testing-tps-7500536-1-617.svc:4000 |       NULL |


+-------+---------------------+--------------+------------+----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------+---------------------+---------------------+----------+-------------+---------------------------------------------------------------------------+------------+
91 rows in set (0.00 sec)


4. What is your TiDB version? (Required)

master

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions