Performance regression with sort_intersection in maria-5.1-wl21
Bug #686355 reported by
Philip Stoev
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MariaDB |
Fix Released
|
High
|
Igor Babaev |
Bug Description
The following query against the DBT-3 data set is much slower in maria-5.1-wl21 because it gets executed with sort_intersection
SELECT COUNT( l_suppkey ) FROM lineitem WHERE (l_suppkey = 3 AND l_partkey = 255 ) OR (l_partkey BETWEEN 111 AND 244);
The left side of the OR expression returns zero rows. Each side is easily computable with an index when executed separately.
Related branches
Changed in maria: | |
assignee: | nobody → Igor Babaev (igorb-seattle) |
milestone: | none → 5.1 |
Changed in maria: | |
status: | New → Confirmed |
importance: | Undecided → High |
Changed in maria: | |
status: | Confirmed → In Progress |
Changed in maria: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
In MariaDB-5.1 with scale factor 0.01
id: 1 partkey, i_l_partkey, i_l_suppkey
select_type: SIMPLE
table: lineitem
type: range
possible_keys: i_l_suppkey_
key: i_l_suppkey_partkey
key_len: 10
ref: NULL
rows: 4009
Extra: Using where; Using index
statistics: Handler_ read_next: 4003, Handler_read_key: 2
running time as reported by client: 0.00 sec
In maria-5.1-wl21
id: 1 partkey, i_l_partkey, i_l_suppkey i_l_suppkey_ partkey i_l_partkey, i_l_suppkey_ partkey) ; Using where
select_type: SIMPLE
table: lineitem
type: range
possible_keys: i_l_suppkey_
key: i_l_partkey,
key_len: 5,10
ref: NULL
rows: 241
Extra: Using sort_intersect(
execution time: 0.09
| Handler_read_key | 4 |
| Handler_read_next | 8040 |
| Handler_read_prev | 0 |
| Handler_read_rnd | 4003 |