This preliminary results came from the same hardware than
previously used on this blog.
In short: notebook with a SSD and Core i7 mobile.
Note that these tests are not about the relative speed of each database
engine, but reflect the current status of the integration of several DB
libraries within the mORMot database layer.
Purpose here is not to say that one library is better or faster than another,
but publish a snapshot of mORMot persistence layer abilities.
In this timing, we do not benchmark only the "pure" SQL-DB layer access
(SynDB*
units), but the whole Client-Server ORM of our framework:
process below includes read and write RTTI access of a TSQLRecord
,
JSON marshalling, CRUD/REST routing, virtual cross-database layer, SQL
on-the-fly translation. We just bypass the communication layer, since
TSQLRestClient
and TSQLRestServer
are run in-process,
in the same thread - as a TSQLRestServerDB
instance. So you have
here some raw performance testimony of our framework's ORM and RESTful
core.
Jet/MSAccess database engine is accessed via OleDB.
NexusDB is the free embedded
edition, which is a perfect match for a Client-Server ORM framework like
mORMot.
Oracle server is a remote 11g instance, accessed with a "slow" 100 MB
network.
SQLite3 is our static embedded engine, either as internal or external
database, or the latest 3.7.15.2
official sqlite3.dll
library, for ZEOS and
UniDAC.
TObjectList is our in-memory optimized engine, with hashed indexes,
and able to persist its data as JSON file or an optimized and compressed binary
content.
Insertion speed
We use the sample provided within the source code tree, i.e. "15 - External DB performance".
Direct | Batch | Trans | Batch Trans | |
SQLite3 (file full) | 536 | 525 | 93687 | 113527 |
SQLite3 (file off) | 941 | 610 | 94222 | 98590 |
SQLite3 (mem) | 84722 | 104727 | 100425 | 126974 |
TObjectList (static) | 298560 | 423657 | 300951 | 385089 |
TObjectList (virtual) | 298721 | 445473 | 299293 | 444207 |
SQLite3 (ext full) | 262 | 259 | 94916 | 120293 |
SQLite3 (ext off) | 337 | 330 | 103941 | 112336 |
SQLite3 (ext mem) | 95418 | 119442 | 110238 | 143135 |
UniDAC SQlite3 | 239 | 253 | 7916 | 38696 |
ZEOS SQlite3 | 372 | 374 | 362 | 467 |
Oracle | 538 | 62295 | 1228 | 62156 |
ODBC Oracle | 639 | 605 | 1743 | 1606 |
ZEOS Oracle | 441 | 424 | 1109 | 1140 |
UniDAC Oracle | 528 | 557 | 1061 | 1237 |
BDE Oracle | 489 | 511 | 1024 | 1003 |
Jet | 4243 | 4442 | 4924 | 4982 |
NexusDB | 4697 | 6711 | 5723 | 8786 |
ZEOS Firebird | 1791 | 1870 | 6522 | 7213 |
UniDAC Firebird | 3670 | 7135 | 4751 | 10125 |
NexusDB has a pretty good insertion speed, but no "BATCH" mode, nor
prepared statement re-use. But not bad for such a small unit.
ZEOS also lacks of some optimizations like prepared statement cache,
but does work well for an Open Source free solution.
Read speed
Read speed is comparable to insertion speed.
Depending on the design of each library, results are similar.
BDE performance is not so good, indeed. When working with Oracle,
it is pretty slow, especially when retrieving data.
But it (still) works!
Both Jet/MSAccess and NexusDB are pretty good, as embedded
engines, for reading.
Of course, our direct SQlite3 or in-memory TObjectList
engines are incredibly fast. Just as usual.
By one | All Virtual | All Direct | |
SQLite3 (file full) | 26755 | 435995 | 440683 |
SQLite3 (file off) | 26527 | 435995 | 438519 |
SQLite3 (mem) | 126253 | 438711 | 423155 |
TObjectList (static) | 289955 | 689369 | 681477 |
TObjectList (virtual) | 299383 | 234126 | 707714 |
SQLite3 (ext full) | 122524 | 202208 | 356760 |
SQLite3 (ext off) | 137358 | 228102 | 432376 |
SQLite3 (ext mem) | 139209 | 228738 | 432226 |
UniDAC SQlite3 | 2001 | 74155 | 96140 |
ZEOS SQlite3 | 3486 | 81959 | 115856 |
Oracle | 1753 | 77429 | 92423 |
ODBC Oracle | 1909 | 36789 | 42530 |
ZEOS Oracle | 601 | 47028 | 55233 |
UniDAC Oracle | 653 | 25960 | 28083 |
BDE Oracle | 860 | 3870 | 4036 |
Jet | 2605 | 150051 | 231792 |
NexusDB | 1360 | 128816 | 204976 |
ZEOS Firebird | 2508 | 56771 | 71822 |
UniDAC Firebird | 1850 | 66882 | 88021 |
We are working on direct integration of Firebird (either directly
via an unfinished SynDBFirebird.pas
unit, or via ZEOS /
Unidac / any TDataset
based component), but we are still
fighting with some configuration issues.
Any help is welcome. Don't be shy!
The SAD pdf (in its 1.18 revision) has been updated to include information about external database connection via those libraries.
Feedback is welcome on our forum.