Forum OpenACS Q&A: Response to mysql passes the acid test?

Collapse
Posted by Todd Gillespie on
Don:
Heikki Tuuri, the InnoDB author, hangs out on comp.databases.  I asked him why he wrote such a nice back-end for MySQL rather than something more mature, eg, Postgres.  His reponse:
(note: before I catch any heat from anyone, I'm just reposting this, not advocating it, and particularly not his questionable benchmarking methods)

your posting from April 19th is not visible at newsone.net yet for some
reason. Therefore I reply to your earlier post.

You asked why I installed InnoDB under MySQL and not PostgreSQL.

The first reason was that in MySQL there is a standardized interface
to lower level storage managers (called table handlers in MySQL) which
MyISAM, BDB, and InnoDB use. I have not studied PostgreSQL
source at that detail, but the object-relational features
there may require something extra from the storage manager.

Another reason is speed: InnoDB was designed to be the fastest
disk-based database engine in the world. Also MySQL SQL interpreter
is fast. The combination MySQL/InnoDB is thus only 30 % slower than
a standalone InnoDB and in many tests faster than the standard table
type of MySQL.

Last summer I measured PostgreSQL 7.0 against a standalone InnoDB.
I got the following results:
                            CPU time in seconds

Test                        InnoDB PostgreSQL 7.0

-----------------------------------------------------

Insert of 100 000 rows,
copied from a table          15          160

Count(*) from a join of
10 000 rows                    0.5          9

-----------------------------------------------------

Test details: tables had two integer columns, and a unique, primary
index on the first integer column. The machine was a 100 MHz Pentium
with 32 MB of RAM, NT 4.0. CPU times are from Task Manager of NT.

The tests above measure the basic internal speed of the database
engine. The time spent to communication with the client is negligible
because the tests above consisted of a single SQL statement. Both
InnoDB and PostgreSQL are transactional databases with row-level
locking and thus comparable.

The third reason was that Monty Widenius, the writer of MySQL
lives in the same town as I :).