Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: 5.5.30
-
Fix Version/s: 5.5.31
-
Component/s: None
-
Labels:None
Description
5.5 is slower than 5.3 on a DBT-3 query#1, MyISAM storage engine.
Profiling shows that 5.5 does many str_to_datetime calls.
The query:
select
l_returnflag,
l_linestatus,
sum(l_quantity) as sum_qty,
sum(l_extendedprice) as sum_base_price,
sum(l_extendedprice * (1 - l_discount)) as sum_disc_price,
sum(l_extendedprice * (1 - l_discount) * (1 + l_tax)) as sum_charge,
avg(l_quantity) as avg_qty,
avg(l_extendedprice) as avg_price,
avg(l_discount) as avg_disc,
count(*) as count_order
from
lineitem
where
l_shipdate <= date_sub('1998-12-01', interval 79 day)
group by
l_returnflag,
l_linestatus
order by
l_returnflag,
l_linestatus;
See comments to MDEV-4150 for analysis. MySQL-5.5's "constant item caching" interferes with get_datetime_value()'s caching mechanism, as a result, datetime value is cached in its string form, and we get string->datetime conversion done for every row.
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
Small dataset for debugging. Performance difference can be observed on a big dataset.