Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
5.5.30
-
None
-
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.
Attachments
Issue Links
- causes
-
MDEV-4284 Assertion `cmp_items[(uint)cmp_type]' fails in sql/item_cmpfunc.cc
- Closed