On 13 May 2018, at 11:50am, Techno Magos <technoma...@googlemail.com> wrote:
> So, memory sqlite is not really usable with multiple threads (readers).
> While one might expect that multiple readers of *memory *content could
> scale even better than with file content.
> Can this restriction be lifted?
It's not a pointless restriction. It's how computers work.
A memory bus cannot respond to two requests for memory at once. It has a set
of address lines. You put the address you require on those lines. You then
send the "read that address" signal. The memory bus goes to fetch the data
from that address, puts whatever it finds on the data lines, then signals
Having multiple processors speeds things up only if all you're doing is
processing. When two threads need to read data from the same piece of memory
they have to queue up to make requests for data. You may be better off if each
process has its own memory.
[above is simplified for clarity]
See what happens if you stop using shared cache mode. Also, if all your
threads are merely reading, not writing, make sure they're using a connection
(or one connection per thread) which was opened that way. That allows SQLite
to use lots of internal tricks.
sqlite-users mailing list