Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:
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.
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
Re: Performance regression with sort_intersection in maria-5.1-wl21
In MariaDB-5.1 with scale factor 0.01
id: 1
select_type: SIMPLE
table: lineitem
type: range
possible_keys: i_l_suppkey_partkey,i_l_partkey,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
select_type: SIMPLE
table: lineitem
type: range
possible_keys: i_l_suppkey_partkey,i_l_partkey,i_l_suppkey
key: i_l_partkey,i_l_suppkey_partkey
key_len: 5,10
ref: NULL
rows: 241
Extra: Using sort_intersect(i_l_partkey,i_l_suppkey_partkey); Using where
execution time: 0.09