Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
seiya-annie opened this issue Mar 14, 2024 · 1 comment · Fixed by #51785
Closed

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

seiya-annie opened this issue Mar 14, 2024 · 1 comment · Fixed by #51785
Assignees
Labels
severity/major sig/planner SIG: Planner type/bug The issue is confirmed as a bug.

Comments

@seiya-annie
Copy link

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

@seiya-annie seiya-annie added the type/bug The issue is confirmed as a bug. label Mar 14, 2024
@seiya-annie
Copy link
Author

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/major sig/planner SIG: Planner type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants