Benchmarks: Performance advantages to store complex object structures
db4o is fast. In the PolePosition open
source database benchmark db4o displays significant performance advantages,
especially when it comes to storing complex object structures. Several "circuits" represent different use cases. You can download,
modify, and run them for yourself.
The Barcelona
circuit, for instance, shows transaction performance (100 selects on 30,000
objects over 5 levels of inheritance structures) for different database products
and data access methods. As you can plainly see, resolving the object-relational
mismatch by using an object-relational mapper like Hibernate or VOA (JDO) costs
a lot of performance. db4o overcomes the trade-off between object-orientation and
speed: You can now store objects natively and enjoy great performance gains.
|
Barcelona Benchmarks |
read |
write |
query |
delete |
|
Native/db4o 6.4 |
1.0 |
1.0 |
1.0 |
1.0 |
|
Hibernate/hsqldb |
15.8 |
3.7 |
2,583.1 |
4.3
|
|
Hibernate/mysql |
48.0 |
26.1 |
14.4 |
26.9 |
|
JDBC/MySQL |
40.8 |
19.5 |
9.3 |
15.8 |
|
JDBC/JavaDB |
27,843.7 |
20.5 |
47,993.1 |
17.7 |
|
JDBC/HSQLDB* |
1.9 |
1.1 |
2,554.4 |
0.5 |
|
JDBC/SQLite |
8.8 |
519.1 |
1.1 |
362.1 |
| * JDBC/HSQLDB not ACID transaction safe |
|
|
Benchmarks always depend on the nature of a tested task. The PolePosition authors deserve credit because they show which
database is a good fit for which task. The rule of thumb is: The flatter and simpler
the data, the better you perform with direct SQL access to relational databases,
e.g. by JDBC. When object structures become more complex, you can not afford to
ignore object databases. If performance is of concern, then Hibernate, VOA (JDO)
or other object-relational mapper solutions are not a viable choice, because their
negative impact on performance is dramatic.
Below are other benchmark "circuits" that demonstrate different use cases:
- Melbourne
- writes 100,000 unstructured flat objects of one kind in bulk mode
- Bahrain
- writes 30,000 simple flat objects individually
- Sepang
- writes an object tree of depth 14
- Imola
- retrieves 300,000 objects by native ID
|
Other Benchmarks |
Melbourne |
Bahrain |
Sepang |
Imola |
|
Native/db4o 6.4 |
1.0 |
1.0 |
1.0 |
1.0 |
|
Hibernate/hsqldb |
3.1 |
1.3 |
2.7 |
5.9 |
|
Hibernate/mysql |
7.4 |
4.1 |
10.9 |
32.2 |
|
JDBC/MySQL |
3.8 |
2.6 |
7.2 |
18.3 |
|
JDBC/JavaDB |
1.8 |
2.1 |
407.0 |
5.7 |
|
JDBC/HSQLDB* |
0.2 |
0.2 |
1.0 |
0.4 |
|
JDBC/SQLite |
100.3 |
62.5 |
154.8 |
5.8 |
|
* JDBC/HSQLDB not ACID transaction safe |
|
|