Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-4265

5.5 is slower than 5.3 because of many str_to_datetime calls

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 5.5.30
    • 5.5.31
    • 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

          Activity

            People

              serg Sergei Golubchik
              psergei Sergei Petrunia
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.