[MDEV-2446] LP:754521 - Bogus Last_query_cost reported when sort_intersect is used Created: 2011-04-08 Updated: 2015-02-02 Resolved: 2012-10-04 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Critical |
| Reporter: | Philip Stoev (Inactive) | Assignee: | Igor Babaev |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Launchpad | ||
| Attachments: |
|
| Description |
|
If the sort_intersection optimization is in effect, Last_query_cost takes a huge value, such as 3689348814741910528 . Timour reported that Last_query_cost is not an obsolete variable. To reproduce: 1. Download the dbt3 scale 0.001 mysqldump from and load with --default-storage-engine=InnoDB 2. Run query: SELECT COUNT( l_receiptdate ) FROM lineitem WHERE ( l_receiptDATE IN ( '1992-03-19' , '1993-04-01' ) OR l_receiptDATE IN ( '1998-06-27' , '1992-09-13' , '1993-10-13' ) AND l_shipdate BETWEEN '1994-08-01' AND '1994-08-29' AND l_linenumber BETWEEN 9 AND 5 + 8 ) AND ( ( l_receiptDATE >= '1994-02-13' ) AND ( l_orderkey = 580 OR l_quantity BETWEEN 46 AND 6 + 4 OR l_partkey = 227 OR l_shipdate IN ( '1994-05-26' , '1998-09-03' , '1993-11-15' , '1994-03-11' , '1992-12-10' , '1998-04-14' ) ) ); explain is:
last_query_cost is: MariaDB [test]> show status like '%last_query_cost%';
----------------
---------------- |
| Comments |
| Comment by Igor Babaev [ 2011-04-27 ] | ||||||||||||||||||||||||||||||
|
Re: Bogus Last_query_cost reported when sort_intersect is used MariaDB [test]> EXPLAIN SELECT * FROM City, Country WHERE City.Name LIKE 'C%' AND City.Population > 1000000 and Country.Code=City.Country;
---
--- | ||||||||||||||||||||||||||||||
| Comment by Igor Babaev [ 2011-04-27 ] | ||||||||||||||||||||||||||||||
|
Re: Bogus Last_query_cost reported when sort_intersect is used MariaDB [test]> SET SESSION optimizer_switch='index_merge_sort_intersection=on'; MariaDB [test]> EXPLAIN SELECT * FROM City, Country WHERE City.Name LIKE 'C%' AND City.Population > 1000000 and Country.Code=City.Country;
---
--- | ||||||||||||||||||||||||||||||
| Comment by Rasmus Johansson (Inactive) [ 2011-12-13 ] | ||||||||||||||||||||||||||||||
|
Launchpad bug id: 754521 |