Feb 01 2009

We are in Mysql Speed Test (Myisam vs InnoDB)

Published by Root at 01:00 under Mysql, Php, programlama, zend

Ok. In present day, almost everybody have a web site. Actually many kind of web site is dynamic. I change my decision to mysql. (maybe later postgresql or another)

And in starting every kind of database fast and doing their job clearly. So time is past and past and past and past ……… Database will taked more data and getting slowly.

Ok. This article about myisam and innodb.
Test database 3300 unique data and i copy more and we have 217k data now. (Innodb and Myisam)

Test computer have (My old friend) 512 mb Ram, Centrino 2.0 GHZ (Pentium M). and a lot of process. (in web server we have a lot of process.)

Ok Let’s test. Not: Myisam hasn’t fulltext,index or nothing

First Test: Count to Data. (command base)

InnoDB: 15.14 second. (217536)
Myisam: 0 second (217536)

Second Test: Select * from tables limit 600,30

InnoDB: 0.14 second. (30)
Myisam: 0.06 second (30)

Third Test: Select * from tables order by RAND() limit 5;

InnoDB: 5.28 second. (5)
Myisam: 2.31 second (5)

Fourth Test: Select * from tables where column like “%yo%” limit 5;

InnoDB: 0.05 second. (5)
Myisam: 0.03 second (5)

This is done for now. Myisam id winner of speed test. ;) For now.


2 responses so far

2 Responses to “We are in Mysql Speed Test (Myisam vs InnoDB)”

  1. Onur Özgür ÖZKANon 02 Oct 2009 at 21:33

    Dear Author,

    You are right. MyISAM is faster than InnoDB. But MyISAM isn’t a relation database table. So you can’t use foreign key in MyISAM. You can’t use roll back, commit, etc… :) But you can use them in InnoDB. In InnoDB you can not use FULL TEXT search.

    Accortian to me use myisam when you coding CMS , and use LOG table, use InnoDB when you are coding USER, PRODUCT table etc…

    And one more question why don’t you write Turkish? :) We need turkish source on IT.

    Best Regards.

  2. Rooton 29 Oct 2009 at 21:02

    Hadi cevabı türkçe yazıyım zaten eklenti.org ‘u değiştirmeyi düşünüyorum. ( :) ) Evet mysql tablolarında innoDB ile daha güvenli ve sağlam bir yapı kullanabiliriz. Özellikle tablo ilişkilendirme olması bile yeterli. Diğer özellikleri saymıyorum. Ama internet tabanlı sayfalarda FULL text (bunu türkçeleştiremedim.) arama çok ama çok değerli.
    IYS’ lerinde firmaların ihtiyaçları en önemli noktada arama sonuçları doğruluğu olduğundan genel tablo yapısını firmaya özel kuruyoruz. Tabii full text aramalarda puan tabanlı aramanın tadıda bir başka oluyor. :D . Birde bazı noktalarda (örn. count(*) ) inno DB bir işkence. Belki bir iki stored func. veya trigger ile desteklenmiş, innoDB ve myisam karışımı bir yapı daha güçlü olabilir. Hatta olur. Dur bakalım yeni IYS de onu kullanalım. :D

    Türkçe kaynak olmamasının sebebide aynı yazının yazılmasında sadece 2 saat sonra çalıntılanması. Belkide daha önce paylaştığım yazılara google’ın değer vermemesi. Belki ben eşeğim. Evet,evet ben eşeğim. :D
    ;)

Trackback URI | Comments RSS

Leave a Reply