Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5, 10.6
Description
It is expected that the range estimates that InnoDB returns from records_in_range call are not exact. Returning about 2x more or 2x less than actual value is considered to be still ok.
However, we are observing a 4.8x difference on a fairly large table. Unfortunately, the table is at the customer site and cannot be provided here.
Attachments
Issue Links
- causes
-
MDEV-35457 Remove btr_cur_t::path_arr
-
- Closed
-
- relates to
-
MDEV-17111 Estimates are low for a condition that satisfies all the rows of an INNODB table
-
- Closed
-
-
MDEV-19424 InnoDB's records_in_range estimates are capped at about 50%
-
- Closed
-
-
MDEV-29835 Partial server freeze
-
- Closed
-
-
MDEV-30148 Race condition between non-persistent statistics and purge of InnoDB history
-
- Closed
-
-
MDEV-20169 main.partition_innodb fails in buildbot with wrong result
-
- Closed
-
-
MDEV-21895 Refactor handler::records_in_range()
-
- Stalled
-
-
MDEV-30637 Mariadb server hangs
-
- Closed
-
-
MDEV-30648 btr_estimate_n_rows_in_range() accesses unfixed, unlatched page
-
- Closed
-
I filed MDEV-21895 for a task of refactoring ha_innobase::records_in_range() to address the problems that I am aware of. It might be possible to do something in earlier versions, especially if a repeatable test case can be provided.
Note that there are also some strange things around handler::stats.records in handler::info(), as noted in
MDEV-20169. That might also affect some query plans.