After changing the parameters, it seems that the analyze operation is indeed not running. The initial value of the parameter is +0000, and I only changed the front part when I modified it.
So why didn’t the automatically performed analyze take effect? The health value is still 0. For other tables, the health value becomes 100 after I manually execute analyze.
After changing the parameter, it seems that the analyze operation indeed stopped running. The initial value of the parameter was +0000, and I only changed the front part when I modified it.
So why didn’t the automatically performed analyze take effect? The health value is still 0, but for other tables, the health value becomes 100 after I manually execute analyze.
The time you changed is set to execute from midnight to 7 AM. If it doesn’t pass through that time period, analyze won’t be executed, and the health value will remain the same.
The reason for triggering analyze when executing SQL in the production environment should be caused by the value of tidb_auto_analyze_ratio, because the health of the table is already 0, meaning the table content has been modified;
As shown in your image, the tidb_auto_analyze_ratio is configured to the default value of 0.5, which means that analyze is triggered when more than 50% of the rows in the table are updated;
Of course, the main culprit is still that analyze did not automatically execute according to the designed time.
At first, the time zone was incorrect. The +0800 mentioned above is correct. After changing it to +0800, it no longer triggers. The current issue is that the automatically triggered analyze is not taking effect. Before I modified the parameters, analyze was being triggered continuously, but the health value remained at 0. Only after I manually triggered it did the health value become 100.
No, after analyze was triggered, it kept triggering because it didn’t take effect. You can see from my screenshot that after I manually triggered it, the health value became 100. This indicates that the automatic trigger did not take effect.
At the beginning, the time zone was incorrect. The +0800 mentioned above is correct. After changing it to +0800, it no longer triggers. The current issue is that the automatically triggered analyze did not take effect. Before I modified the parameter, analyze was always triggered, but the health value was always 0. After I manually triggered it, the health value became 100.
Before you modified it, the time was +0000. For our time zone, the time period you set just happened to include our working hours, which, combined with the tidb_auto_analyze_ratio parameter value, triggered the statistics.
After changing it to +0800, you can check if statistics are being done at night.
Hmm, after making the changes, there should be statistical information available by tonight, right? (assuming the tidb_auto_analyze_ratio conditions are met)
First of all, I think since we are helping others solve problems, we should definitely first understand their issues and responses, right?
In my question, I posted a picture showing that the dashboard continuously executes analyze table on the same table. The health value of the table remains at 0 until I manually execute analyze table, after which the health value becomes 100. Does this indicate that the analyze table automatically executed by TiDB before my manual execution was ineffective?