[MDEV-5806] Single Query Performance Regression in Group BY Created: 2014-03-07  Updated: 2014-03-09  Resolved: 2014-03-09

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: MARCHAL Sebastien Assignee: Elena Stepanova
Resolution: Not a Bug Votes: 0
Labels: None
Environment:

Red Hat Enterprise Linux Server release 6.5 (Santiago)


Attachments: Text File diffstatus-10.log     File explain_paln.csv     JPEG File image001.jpg     Text File iosstat-10.log     Text File server.txt     File show create table.sql     File show table status.csv     File show_status.csv     Text File vmstat-10.log    

 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



 Comments   
Comment by VAROQUI Stephane [ 2014-03-07 ]

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.

Comment by VAROQUI Stephane [ 2014-03-07 ]

cnf file

Comment by VAROQUI Stephane [ 2014-03-07 ]

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

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

Comment by MARCHAL Sebastien [ 2014-03-07 ]

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.

Comment by MARCHAL Sebastien [ 2014-03-07 ]

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

Comment by Elena Stepanova [ 2014-03-09 ]

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

Generated at Thu Feb 08 07:07:11 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.