| Bug #105224 | dict_stats_analyze_index() may always discard optimal index-based access paths | ||
|---|---|---|---|
| Submitted: | 14 Oct 2021 9:09 | Modified: | 29 Sep 2025 13:48 |
| Reporter: | casa zhang (OCA) | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server: Optimizer | Severity: | S3 (Non-critical) |
| Version: | 8.0, 8.0.26 | OS: | Any |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | Contribution | ||
[14 Oct 2021 9:09]
casa zhang
[15 Oct 2021 7:08]
casa zhang
This patch is from Tencent TXSQL Group (*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.
Contribution: 0001-BUG-105224-dict_stats_analyze_index-may-always-disab.patch (application/octet-stream, text), 43.18 KiB.
[15 Oct 2021 7:12]
casa zhang
I apologize for that the repeat method is on the base of 8.0.22 version.
[15 Oct 2021 7:28]
MySQL Verification Team
Hello casa zhang, Thank you for the report and Contribution. regards, Umesh
[21 Oct 2021 0:16]
casa zhang
Hi, There are some unstable use cases in last fixed patch. I checked the code again and submit a new patch, which has passed the MTR test already, hope that will be helpful, thanks.
[21 Oct 2021 0:17]
casa zhang
dict_stats_analyze_index() may always discard optimal index-based access paths (*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.
Contribution: 0001-BUG-105224-dict_stats_analyze_index-may-always-disab.patch (application/octet-stream, text), 46.23 KiB.
[29 Sep 2025 13:48]
Edward Gilmore
Posted by developer:
Added the following note to the MySQL Server 9.5.0 release notes:
The dict_stats_analyze_index() function could discard optimal
index-based access paths, resulting in suboptimal performance
for large tables when empty index statistics are read
concurrently or an error leads to empty index statistics.
Our thanks to Casa Zang and the Tencent team for the
contribution.
[19 Oct 2025 17:09]
Edward Gilmore
Posted by developer: Added the following note to the MySQL Server 9.5.0 release notes: The dict_stats_analyze_index() function in could discard optimal index-based access paths, resulting in suboptimal performance for large tables when empty index statistics are read concurrently or an error return leads to empty index statistics. Our thanks to Casa Zang and the Tencent team for the contribution.
[26 Dec 2025 3:15]
dakun li
"Hi, I am experiencing frequent, sporadic execution plan flips on large, frequently updated tables in MySQL 8.0.26 and 8.0.40. This has caused a severe impact on our system. I suspect this issue is related to this bug. Do you have any plans to fix this in future MySQL 8.0 versions? Is there an estimated timeline (ETA) for the fix? Thank you very much."
