Jan 162012

MongoDB vs. MySQL (MyISAM and InnoDB) – performance comparison

As part of learning new tools for testing, I took the mongoDB database performance and comparing the results of a MySQL database, both in MyISAM and innoDB tables.

As a test platform I used only the local computer with 4 GB of RAM, i3 (2.4 GHz). The data source was a table of 217 thousands of records.

MySQL (MyISAM) - 5.1.49
MySQL (InnoDB) - 5.1.49
MongoDB - 2.0.2
PHP - 5.3.6

All times are in seconds, and each query is executed in a loop 10 times and the result presented is the average of theese 10 performances.

 MySQL (MyISAM)MySQL (innoDB)mongoDB
WHERE field = ?3.631 21.9110.016
WHERE field zLIKE 'x%'3.75519.5620.040

The results speak for themselves - mongoDB is perfect for large databases, where the advantage over MySQL is the most visible.

Kategoria: Programming Tagged with , , , , 4 comments
4 Responses to MongoDB vs. MySQL (MyISAM and InnoDB) – performance comparison
  1. Jarek

    Popraw sobie post bo nie widać najważniejszego obrazka chyba ;)

  2. grzegorz

    Dzięki, wtyczka do tabel była zdezaktywowana po aktualizacji WordPressa.

  3. Robert

    Może napiszesz coś o zastosowaniach nierelacyjnych baz danych i jak te dane “włączać” do systemu relacyjnego?

  4. Angelika13456

    Nowy numer Software Developer’s Journal został w całości poświęcony MongoDB.
    Warto przeczytać: http://en.sdjournal.org/mongodb-sdj-0512/

Leave a Reply

Your email address will not be published. Please enter your name, email and a comment.