# Standard MySQL faster than Percona and Maria on my rig

**URL:** <https://forums.percona.com/t/standard-mysql-faster-than-percona-and-maria-on-my-rig/1741>\
**Category:** Other MySQL® Questions\
**Created:** [January 25, 2012, 5:34am UTC](https://forums.percona.com/t/standard-mysql-faster-than-percona-and-maria-on-my-rig/1741 "2012-01-25T05:34:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![LarryDavid](https://avatars.discourse-cdn.com/v4/letter/l/c89c15/32.png) [@LarryDavid](https://forums.percona.com/u/LarryDavid)\
**Post date:** [January 25, 2012, 5:34am UTC](https://forums.percona.com/t/standard-mysql-faster-than-percona-and-maria-on-my-rig/1741/1 "2012-01-25T05:34:49Z")

</div>

One thing I have noticed with MySQL alternatives is that they are stated to be faster than MySQL for large database / high volume usage.

That’s great and certainly useful for a lot of sites. My site, however, I am actually seeing worse performance with Percona and MariaDB.

The site has low traffic, includes a forum but the main use is for displaying stats from the database. In one particular report the time taken from generating to completing in the browser window is as follows:

MySQL 5.8sec  
Percona 6.2sec  
MariaDB 6.5sec

All are using the same my.cnf file, so I wonder if I need to do any further tweaking to see better performance with Percona or MariaDB?

---

<div class="post-metadata">

**Author:** ![LarryDavid](https://avatars.discourse-cdn.com/v4/letter/l/c89c15/32.png) [@LarryDavid](https://forums.percona.com/u/LarryDavid)\
**Post date:** [January 25, 2012, 5:43am UTC](https://forums.percona.com/t/standard-mysql-faster-than-percona-and-maria-on-my-rig/1741/2 "2012-01-25T05:43:34Z")

</div>

Here’s some info on the stats table:

Consists of 200,000 rows and 220 fields. Total size around 300Mb.

This table is readonly and for optimal performance is stored in a Memory Table.

drop table if exists MEM\_aw\_races;  
create table MEM\_aw\_races engine=memory select \* from aw\_races;  
drop aw\_races;

PHP is used to create a user form for selecting a report and for processing the data.

As the report contains dozens and dozens of sub reports I select data from the MEM\_aw\_races table and store into a smaller temporary memory table:

$temp\_table = ‘temp\_’ . substr(rand().rand().rand(), 0, 6);  
create temporary table $temp\_table ENGINE = MEMORY SELECT // around 60 columns here // from MEM\_aw\_races where // users query here //

//Sub reports here  
function sub\_reports($group, $heading) {

```
$result = &#64;mysql_query("select $group,sum(if(position=1,1,0)),count(*),sum(if(position=1,sp ,-1)),sum(1/(sp+1)),sum(placed) from $temp_table group by $group");
while($row = &#64;mysql_fetch_row($result)) {

```

//display table data  
}  
drop table $temp\_table;

Is this method not suited to Percona or MariaDB?

---

<div class="post-metadata">

**Author:** ![LarryDavid](https://avatars.discourse-cdn.com/v4/letter/l/c89c15/32.png) [@LarryDavid](https://forums.percona.com/u/LarryDavid)\
**Post date:** [January 25, 2012, 6:41am UTC](https://forums.percona.com/t/standard-mysql-faster-than-percona-and-maria-on-my-rig/1741/3 "2012-01-25T06:41:33Z")

</div>

Just ran a few more tests.

At the console:

mysql\> create temporary table $temp\_table ENGINE = MEMORY SELECT // around 60 columns here // from MEM\_aw\_races where // users query here //

MySQL 0.68sec  
Percona 0.71sec  
MariaDB 0.72sec
