[MDEV-28972] Index statistics disappear from existing partitions when a new partition is added Created: 2022-06-14 Updated: 2023-12-11 |
|
| Status: | Stalled |
| Project: | MariaDB Server |
| Component/s: | Partitioning |
| Affects Version/s: | 10.6 |
| Fix Version/s: | 10.6 |
| Type: | Bug | Priority: | Major |
| Reporter: | Claudio Nanni | Assignee: | Alexey Botchkov |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | None | ||
| Attachments: |
|
| Description |
|
When adding a new partition the statistics disappear from existing partitions. This is not specific for one table but it's general for all partitioned tables schemas.
An explicit ALTER ONLINE TABLE XXXX ANALYZE PARTITION p2022_05_26; Restored the statistics for such partition.
Attached global variables. |
| Comments |
| Comment by Alexey Botchkov [ 2022-10-05 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
It is reproducible with the InnoDB engine.
results in
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Claudio Nanni [ 2023-10-10 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Another test, First Statistics are accurate, 3 values in P8 and 97 values in P9, adding P10 makes them 2 and 19, ANALYZE brings them back ok.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Claudio Nanni [ 2023-10-10 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Now adding a larger partition up to 100.000, you see stats are deleted for previous partition and messed up a bit for the few before it:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Claudio Nanni [ 2023-10-10 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
holyfoot Please check my latest comments, I could reproduce in the measure of resetting the stats of the most recent partition when adding a new one. |