Raima Database Manager (RDM) vs. SQLite: Performance Comparison Example
The majority of today’s operating system and hardware support multithreading. SQLite does not take advantage of this opportunity because of the design in SQLite. When there are many concurrent writes to a SQLite database, application users experience a significant reduction in speed and the application may not meet the users performance expectations. It is well known that the write access to the SQLite database can only be granted if no other requests are being serviced. It is the “one write at a time” design within SQLite that slows down the throughput. Thus, many application owners are forced to look for alternative embedded database options to resolve their performance bottleneck.
Raima has put together a test that proves the differences between the RDM database solution and SQLite. In this test, we demonstrate that RDM is a good alternative to SQLite.
How we did the test
In this performance comparison, we used a standard TPC-B test framework from www.tpc.org. The TPC-B measures throughput in terms of how many transactions per second the system can perform. The test has been modified to allow for comparisons where multiple clients are doing parallel work.
We used the same test environment and framework for both SQLite and RDM. In the test, RDM proved to be significantly faster than SQLite. See illustration below. The platform used for the test was RDM release 14.1 running against SQLite v3.23 on a standard Windows 10, Intel i7 processor machine with 16GB’s of RAM and standard SATA hard drive.
RDM has a design that is optimized for embedded systems with a modern and efficient set of API’s, along with a well-designed database storage file format. RDM allows for concurrent writes and reads and therefore can do many more times the amount of work that SQLite can do.
Because of RDM´s multithread support, RDM will execute a substantial higher amount of transactions when compared with SQLite.
In the diagram below RDM push over four times the number of transactions that SQLite can within the same time frame and hardware constraints. If this test is done using anin-memory design, the difference is even more noticeable.
Breaking down the test above further shows the number of transactions done per second on each client of the database.
As proven in the illustration above, due to SQLite’s design, it has a variable number of transactions it can do per second on each client of the database. RDM delivers up to four times increase in the number of transactions per second per client. If stability and consistency are important, RDM is a great fit.
RDM is designed to deliver consistent and dependable transactions per second while being multi-user friendly and efficient.
How to migrate from SQLite to RDM
How to migrate to RDM in order to try out the benefits? The answer is more straightforward than you may expect. RDM supports nearly the same level of SQL that SQLite does. Thus, the user would just need to export the contents of their database to a CSV, XML or SQL format, run rdm-create on their database schema file, then run rdm-import on the CSV, XML or SQL format file and the user will have an RDM equivalent to the SQLite database. From there, the user may have to port your application, but RDM supports the ODBC SQL interface, JDBC Java interface and the ADO.NET C# interface so there may not have to be substantial code changes.
Sponsored by Raima.