Skip to main content

Free embedded databases for C# (.Net) performance overview

I have tested several open-source embedded DB engines for .Net to find which one is the best for my purposes.
My choice for testing was:
Test application I wrote does following actions (and measure consumed time):
  1. Prepare DB: Recreate DB & tables (3 tables, 2 non-PK indexes)
  2. Create DB: Insert ~500 records to the DB
  3. Read All: sequentially read 400 records from the only table (no joins)
  4. Read Random: read random 400 records from the only table (no joins)
  5. Read / Write All: sequentially read & update 400 records from the only table (no joins)
  6. Read / Write Random: read & update random 400 records from the only table (no joins)
Results you may see here. FireBird is ~30 times slower on read operations than SQLite but 10-20 times faster on write operations. Overall time wins FireBird. It is 7 times faster.
As for SQLite .Net adapters System.Data.DQLite is faster then sqlite-net for ~ 1.4 times.
Final DB size: 912KB for FireBird, 40KB for SQLite.
I like sqlite-net framework style but current version is slow and does not support blobs & nullable types. I hope it will improve.

If you think I should test something else please comment.

Comments

Popular posts from this blog

Executing asynchronous coroutine (asyncio) synchronously in Python

I worked a lot with async functions in languages other than Python. It's usually very straight-forward and easy to find any answers in internet. It was a surprise that solving a very simple question regarding async in Python took me a day. How to execute an async coroutine in a classic synchronous function? Async library author's position and CPython's GIL made execution of async functions synchronously harder than required. Instead of an exact answer dozens of answers on StackOverflow explain why it is not possible or a bad idea (and a handful of not working suggestions). Ok-ok, I just need a solution! I had to understand how asyncio works to solve this. So, this code allows to synchronously wait for execution completion of async coroutine without a hot spin-lock: def sync_exec ( coroutine : Awaitable ) -> Any :     try :         asyncio . get_running_loop ()     except RuntimeError :         loop = asyncio . new_event_l...

Automated currency conversion in text

I have created a js script to automatically convert currency on page according to the current rate. Lets say I write "$5" and want to show its value in other currencies. I just need to enclose it in a tag with class = "exchange" and voila: $5 . To enable this behavior you need to link jQuery (add <script src="https://code.jquery.com/jquery-2.1.4.min.js" type="text/javascript"></script> to the head of page) and the script itself (add <script src="https://drclnatj7kvk6.cloudfront.net/currency.js" type="text/javascript"></script> to the bottom of the page). Script is based on http://fixer.io/ and http://openexchangerates.github.io/money.js/ . Fiddle is available here:  https://jsfiddle.net/40rr05fb/42/embedded/result/ . Language and displaying currencies can be easily set. Extending the script is also straightforward. If you dont see the magic, its Google Blogger's issue. Go into the arti...

Navigating Challenges of AI-Generated Content Globally

Introduction: In the age of technological innovation, artificial intelligence (AI) has undeniably reshaped the landscape of content creation. While the emergence of AI-generated content brings forth opportunities for efficiency and scale, it also introduces challenges that warrant careful consideration. This article delves into the impact of AI-generated articles specifically on the professional networking platform LinkedIn. Our focus will revolve around the critical aspects of transparency, ethical considerations, and the indispensable role of human oversight in maintaining the integrity of information. The Rise of AI-Generated Content: Artificial intelligence, exemplified by powerful models like GPT-3, has ushered in a new era of content creation. Its ability to mimic human language and generate contextually relevant text has found applications ranging from marketing strategies to the development of virtual assistants. The Pollution of Informational Space: Lack of Accountability: One...