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

Single Query Performance Regression in Group BY

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not a Bug
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      Red Hat Enterprise Linux Server release 6.5 (Santiago)

      Description

      Hi,
      I join show table status ans show create table.

      The query :

      select    a13.id_vehicule  id_vehicule,
                      a12.id_energie  id_energie,
                      sum(a11.num_jo_dans_mois)  WJXBFS1,
                      sum(a11.num_jo_dans_annee)  WJXBFS2
      from      `T_CALENDRIER`              a11
                      cross join            `T_ENERGIE`      a12
                      cross join            `T_VEHICULE`    a13
      where  (a11.Id_Calendrier in (20131231)
      and a13.id_genre in (45))
      group by             a13.id_vehicule,
                      a12.id_energie;
      

      This query is fast in mysql 5.1, but slow in mariadb.

      Thanx for your help.
      Sebastien

        Gliffy Diagrams

          Attachments

          1. diffstatus-10.log
            600 kB
          2. explain_paln.csv
            0.3 kB
          3. image001.jpg
            image001.jpg
            2 kB
          4. iosstat-10.log
            548 kB
          5. server.txt
            2 kB
          6. show_status.csv
            11 kB
          7. show create table.sql
            3 kB
          8. show table status.csv
            0.8 kB
          9. vmstat-10.log
            49 kB

            Activity

            Hide
            stephane@skysql.com VAROQUI Stephane added a comment - - edited

            Compare to mysql 5.1 this query lost 42s for about 300s execution time . Removing the GROUP BY, Sebastien found that the regression can not be reproduce.

            Show
            stephane@skysql.com VAROQUI Stephane added a comment - - edited Compare to mysql 5.1 this query lost 42s for about 300s execution time . Removing the GROUP BY, Sebastien found that the regression can not be reproduce.
            Hide
            stephane@skysql.com VAROQUI Stephane added a comment -

            cnf file

            Show
            stephane@skysql.com VAROQUI Stephane added a comment - cnf file
            Hide
            stephane@skysql.com VAROQUI Stephane added a comment -

            Not the same server MariaDB supposed to be faster :
            Mysql :
            CPU : 2 (2Ghz)
            Mem : 4Go

            MariaDB :
            CPU : 4 (2,6Ghz)
            Mem 16Go.

            Show
            stephane@skysql.com VAROQUI Stephane added a comment - Not the same server MariaDB supposed to be faster : Mysql : CPU : 2 (2Ghz) Mem : 4Go MariaDB : CPU : 4 (2,6Ghz) Mem 16Go.
            Hide
            op2seb MARCHAL Sebastien added a comment - - edited

            Voila déjà les résultat sur mariaDB10 en pièce jointe.

            Pour avoir une machine ISO pour la version 51 de mysql, je dépend du système et ne peut te fournir les informations de suite.

            Show
            op2seb MARCHAL Sebastien added a comment - - edited Voila déjà les résultat sur mariaDB10 en pièce jointe. Pour avoir une machine ISO pour la version 51 de mysql, je dépend du système et ne peut te fournir les informations de suite.
            Hide
            op2seb MARCHAL Sebastien added a comment -

            Hello,
            With Stephane we have compare the follow query :
            create temporary table toto engine=blackhole select a13.id_vehicule id_vehicule,
            a12.id_energie id_energie,
            a11.num_jo_dans_mois WJXBFS1,
            a11.num_jo_dans_annee WJXBFS2
            from `T_CALENDRIER` a11
            cross join `T_ENERGIE` a12
            cross join `T_VEHICULE` a13
            where (a11.Id_Calendrier in (20131031)
            and a13.id_genre in (45));

            On Mysql this query execute in 3510ms
            on MariaDB10 the query takes 4633ms.

            Then we try benchmarck :
            on Mysql :
            /[16:14:16][ 203 ms]/ select benchmark(1000000, encode('hello', 'goodbye') );
            /[16:15:39][ 187 ms]/ select benchmark(1000000, 1024/8 );
            On MariaDB :
            /[16:13:56][ 453 ms]/ select benchmark(1000000, encode('hello', 'goodbye') );
            /[16:15:53][ 359 ms]/ select benchmark(1000000, 1024/8 );

            Its seems we have a problem with our server.

            Thx for your help

            Show
            op2seb MARCHAL Sebastien added a comment - Hello, With Stephane we have compare the follow query : create temporary table toto engine=blackhole select a13.id_vehicule id_vehicule, a12.id_energie id_energie, a11.num_jo_dans_mois WJXBFS1, a11.num_jo_dans_annee WJXBFS2 from `T_CALENDRIER` a11 cross join `T_ENERGIE` a12 cross join `T_VEHICULE` a13 where (a11.Id_Calendrier in (20131031) and a13.id_genre in (45)); On Mysql this query execute in 3510ms on MariaDB10 the query takes 4633ms. Then we try benchmarck : on Mysql : / [16:14:16] [ 203 ms] / select benchmark(1000000, encode('hello', 'goodbye') ); / [16:15:39] [ 187 ms] / select benchmark(1000000, 1024/8 ); On MariaDB : / [16:13:56] [ 453 ms] / select benchmark(1000000, encode('hello', 'goodbye') ); / [16:15:53] [ 359 ms] / select benchmark(1000000, 1024/8 ); Its seems we have a problem with our server. Thx for your help
            Hide
            elenst Elena Stepanova added a comment -

            Closing for now. Please comment to reopen if you have second thoughts regarding the cause of the problem.

            Show
            elenst Elena Stepanova added a comment - Closing for now. Please comment to reopen if you have second thoughts regarding the cause of the problem.

              People

              • Assignee:
                elenst Elena Stepanova
                Reporter:
                op2seb MARCHAL Sebastien
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 45 minutes Original Estimate - 45 minutes
                  45m
                  Remaining:
                  Remaining Estimate - 55 minutes
                  55m
                  Logged:
                  Time Spent - Not Specified
                  Not Specified