2.7x performance regression with correlated indexes and sort_intersection in maria-5.1-wl21
Bug #686353 reported by
Philip Stoev
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MariaDB |
New
|
Undecided
|
Igor Babaev |
Bug Description
The following query against the DBT-3 dataset
SELECT count(*) FROM lineitem WHERE ( l_receiptDATE BETWEEN '1992-11-01' AND '1992-11-29' ) AND l_shipdate < '1992-11-15';
is 10x times slower when executed with sort_intersection.
Igor says that this is " not interesting because lineitem is naturally ordered by l_receiptDATE and l_receiptDATE is strongly correlated with l_shipdate" , " in the case when indexes are correlated intersection causes degradation: this is a well know fact.".
At the same time, the data set is supposedly standard and in real life, almost all date-based indexes will be naturally ordered and correlated to the PK.
Related branches
Changed in maria: | |
milestone: | none → 5.1 |
assignee: | nobody → Igor Babaev (igorb-seattle) |
summary: |
- 10x performance regression with correlated indexes + 10x performance regression with correlated indexes and sort_intersection + in maria-5.1-wl21 |
summary: |
- 10x performance regression with correlated indexes and sort_intersection - in maria-5.1-wl21 + 2.7x performance regression with correlated indexes and + sort_intersection in maria-5.1-wl21 |
To post a comment you must log in.
1. Data volume (DBT-3 factor)
2. Database engine MyISAM
3. Indexes used
id: 1 i_l_receiptdate ,i_l_shipdate i_l_receiptdate ,i_l_shipdate) ; Using where
select_type: SIMPLE
table: lineitem
type: range
possible_keys: i_l_shipdate,
key: i_l_receiptdate
key_len: 4,4
ref: NULL
rows: 414
Extra: Using sort_intersect(
4. Platform. 3-85.fc13. i686.PAE #1 SMP Thu May 6 18:27:11 UTC 2010 i686 i686 i386 GNU/Linux
Linux eve 2.6.33.
Fedora release 13 (Goddard)
5. Execution time
in maria-5.1-wl21 - 0.27 sec , Handler_read_next 72166 , Handler_read_rnd 6296
in maria-5.1 - 0.10 sec, Handler_read_next 7133