Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
10.1(EOL)
-
None
Description
Debugging MDEV-10046, I have discovered that range optimizer will call records_in_range() when we have a full equality range for an extended index.
Example:
create table t1 (
|
pk int primary key,
|
col1 int,
|
...
|
index IDX1(col1)
|
);
|
explain select * from t1 where col1 IN (c11, c12, ...) and pk IN (c21, c22, ..)
|
Here, when doing range analysis for IDX1, we get ranges in form:
(col1, pk)= (c11, c21)
|
When PK is a part of the index, there is no need to call records_in_range: we don't call it for unique indexes, InnoDB internally is set to return 1 when it sees a zero estimate.
Attachments
Issue Links
- relates to
-
MDEV-9764 MariaDB does not limit memory used for range optimization
- Closed
-
MDEV-10046 InnoDB Range Optimizer Regression
- Open