PolePosition benchmarkA well known PolePosition benchmark was run for the following database systems:
- JalistoPlus 2.0 M4 http://jalistoplus.sourceforge.net
JalistoPlus was run in mono mode with synchronous disk access layer with transaction log. Disk access layer without transaction log would probably be faster but since db4o and HSQLDB provide failure safe mechanisms, similar configuration was chosen for JalistoPlus.
- Db4o 7.2 http://www.db4o.com
Native object database for java and .NET
- Hibernate 3.2 http://www.hibernate.org with
Hsqldb 1.8 http://www.hsqldb.org
A well-known object-relational mapper with underlying sql database.
Results are available as pdf here
As benchmark results shows none of tested databases is the best in all situations. Generally speaking object databases (JalistoPlus and db4o) are often better in object write, read by oid, delete and processing of deep inheritance structures while Hibernate+HSQLDB is often better in querying. This is not suprising. Internal design of object databases simplifies individual object persistence and allows for quick navigation over related object while relational structure of SQL databases allows for better query optimization.
JalistoPlus and db4o are comparable in speed (except Bahrain circuit). Sometimes JalistoPlus is faster, sometimes db4o is faster. These differences cannot be explained without studiying of database internals which is not the case. The exception is Bahrain circuit in which JalistoPlus is noticeably slower. It is supposed (but not checked out) that in update operation the whole database content is read but only 100 objects are updated. JalistoPlus query eagerly fetch objects while db4o and Hibernate+HSQLDb can do it lazily. Of course, it slows down the whole operation. Some optimization may be made here.
HSQLDB alone would be the fastest database (as the original PolePos benchmark result shows) but adding Hibernate object-relational mapping layer on top of a relational database has a noticeable negative impact on performance.
Note that PolePosition benchmark concentrates rather on embeedded scenario test. It does not check concurrency issues. All test are single threaded. Queries are also rather simple (query for single field).