Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7604081
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T23:49:05+00:00 2026-05-30T23:49:05+00:00

(Using Delphi 2010 + latest SQLite in WAL mode) I’m using DISQLite (Delphi port

  • 0

(Using Delphi 2010 + latest SQLite in WAL mode)

I’m using DISQLite (Delphi port of SQLite) with my multi-threading client application (yet to be released, so I can change the DB engine if I really have to)

My profiler clearly says it’s a stupid decision, I tracked this down to 2-3 very simple SQL statements that flies when executed in a single-threaded app, but because threads locking/waiting (SQLite really doesn’t perform well with multiple threads trying to write simultaneously)

I did my best to optimize my code / avoid bottlenecks, but after several weeks of hard work, I wonder now if it’s not just easier to dump SQLite & choose a different DB engine(?)

My requirements are:

  1. ACID
  2. Very good simultaneous reading / writing (record level) support
  3. (Very) Fast & stable DB engine
  4. B-Tree
  5. Delphi 2010 support

I’m only using basic INSERT/UPDATE/DELETE commands with indexes, nothing fancy. So my SQL requirements are relatively basic (I don’t need join or other “more advanced” sql stuff).

I’m also open to NQL solutions, as long as it support the requirements mentioned above.

My research lead to Berkley DB, which is, if I understood correctly, a modified version of SQLite with concurrent writing support, but the problem is it’s not really for delphi.

I also read about Kyoto Cabinet, but then again, no delphi support 🙁

Any suggestion would be more than welcome,

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T23:49:07+00:00Added an answer on May 30, 2026 at 11:49 pm

    FWIW, I finally decided to stick to DISQLite along with this “ugly”, hackish, solution:

    • Made some (not-so-minor) changes to minimize writing to DB inside threads as much as possible (Two DB inserts required in each thread)

    • When I absolutely had to write something to DB while working inside threads, I took the SQL query parameters & wrote them in a special folder (writing to files is very fast), ie.

    C:\my-project\pending-sql\insert_SOME-GUID.txt

    Each file would look like this:

    Param1|Param2|Param3|Param4|

    • Once I’m done with the threads (or if my app crashes), I called a routine that scanned this folder, extracted the SQL parameters and run them using prepared statements (wrapped inside a transaction).

    • Any file containing less than, say, 4 parameters would be considered corrupt and would be skipped.

    This is one heck of hackish ugly algorithm (shame on me!), but it works, it’s fast, it’s (sort of) ACID, and I don’t have to spend months learning another DB engine that may (or may not) be suitable.

    I just wanted to thank everyone for their help, time pressure makes it impossible for me to switch to another DB engine, at least for this project.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Delphi 2010, and when I created a console application that prints
I'm using Delphi 2010, and I need to run a console application and automate
I am using Delphi 2010 to implement an Application Menu for my ribbon control...
I am using Delphi 2010 with Tim Anderson's SQLite wrapper (unicode version) Have a
I'm developing a multithreaded client app using Delphi 2010 (using the excellent OmniThreadLibrary) and
I am using Delphi 2010, latest version (from repository) of JEDI WinAPI and Windows
I am using Delphi 2010 to build a Win32 GUI application running on Windows
I am using Delphi 2010 and if I create a new VCL application, drop
I am developing an application in Delphi-2010 using SQL Server 2008 R2 in network
I am using Firebird on Windows (Delphi 2010 developed Application). Is it possible to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.