Can in-memory SQLite databases scale with concurrency?
Posted
by Kent Boogaart
on Stack Overflow
See other posts from Stack Overflow
or by Kent Boogaart
Published on 2010-04-02T13:40:44Z
Indexed on
2010/04/02
14:03 UTC
Read the original article
Hit count: 236
In order to prevent a SQLite in-memory database from being cleaned up, one must use the same connection to access the database. However, using the same connection causes SQLite to synchronize access to the database. Thus, if I have many threads performing reads against an in-memory database, it is slower on a multi-core machine than the exact same code running against a file-backed database.
Is there any way to get the best of both worlds? That is, an in-memory database that permits multiple, concurrent calls to the database?
© Stack Overflow or respective owner