Friday, March 04, 2005

SQLite Database which one is the fastest?

The race is on at sqlite.org where they conduct a series of speed tests for Linux databses using SQLite 2.7.6, PostgreSQL 7.1.3, and MySQL 3.23.41.

SQLite finish first, MySQL is the runner up, with PostgreSQL trailing the pack.

Note to Access users: MySQL can do 25,000 inserts in two seconds. SQLite can do it in less than one second. While Access is great for desktop work, I shudder to think how it would stack up in this test.

A summary of the test;

  • SQLite 2.7.6 is significantly faster (sometimes as much as 10 or 20 times faster) than the default PostgreSQL 7.1.3 installation on RedHat 7.2 for most common operations.

  • SQLite 2.7.6 is often faster (sometimes more than twice as fast) than MySQL 3.23.41 for most common operations.

  • SQLite does not execute CREATE INDEX or DROP TABLE as fast as the other databases. But this is not seen as a problem because those are infrequent operations.

  • SQLite works best if you group multiple operations together into a single transaction.

The results presented here come with the following caveats:

  • These tests did not attempt to measure multi-user performance or optimization of complex queries involving multiple joins and subqueries.

  • These tests are on a relatively small (approximately 14 megabyte) database. They do not measure how well the database engines scale to larger problems.


No comments: