[MDEV-5917] EITS: different order of predicates in IN (...) causes different estimates Created: 2014-03-20 Updated: 2014-03-21 Resolved: 2014-03-20 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 10.0.9 |
| Fix Version/s: | 10.0.10 |
| Type: | Bug | Priority: | Major |
| Reporter: | Sergei Petrunia | Assignee: | Sergei Petrunia |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | eits | ||
| Description |
|
Create the dataset:
Then run:
And then run:
Note that IN predicate is essentailly the same, but "filtered" changes. |
| Comments |
| Comment by Sergei Petrunia [ 2014-03-20 ] | ||||||||||||||||||||||||||
|
If I set a breakpoint at Field::pos_in_interval_val_real (...) It hits here:
When I'm running this query: I observe
On the other hand, if I run the query
| ||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2014-03-20 ] | ||||||||||||||||||||||||||
|
Apparently, records_in_column_ranges() walks over ranges but doesn't save their values into table->record[0]. We always calculate Field_num::pos_in_interval() for whatever was the last value considered by get_mm_tree(). |