Version: v6.1.0
Issue Description: Created an index in the morning, and then the dashboard was spammed with
ANALYZE TABLE $tablename INDEX $indexname;.
Looking at the issue on GitHub, there is currently no solution.
As a temporary fix, you can control the auto_analyze time to a very short duration to solve the frequent screen refresh issue.
Additionally:
You can create a table with the same structure and then transfer the data over to see if manual analyze works normally. If it does, you can use table deletion and renaming to bypass this issue.
In the evening, I will try to use alter table $TABLENAME engine=innodb; to rebuild the table. Let’s see if it solves the issue. Creating a table, importing data, and then renaming it will affect normal business operations.
The “alter” command might not be very effective. Using “engine=innodb” is just a compatible syntax and probably won’t achieve MySQL’s space reclamation or other functions. Rebuilding the table during a low business peak period and using CDC routing synchronization can minimize business impact.
You can also set automatic analyze to a few minutes and then manually write a script to analyze it first.