Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Sqlite: Threads and inserts into a different database for each one. (1 thread fast, >1 slow)

by erix (Vicar)
on Apr 07, 2014 at 10:10 UTC ( #1081383=note: print w/ replies, xml ) Need Help??


in reply to Sqlite: Threads and inserts into a different database for each one. (1 thread fast, >1 slow)

SQLite is not strong in concurrency; for practical (writing) purposes it is best regarded as a 1-person database.

See the SQLite FAQ sit and when (not) to use.


Comment on Re: Sqlite: Threads and inserts into a different database for each one. (1 thread fast, >1 slow)
Re^2: Sqlite: Threads and inserts into a different database for each one. (1 thread fast, >1 slow)
by ssc37 (Acolyte) on Apr 07, 2014 at 10:18 UTC
    Hi,
    Indeed, but i don't do concurrent write on the same database.
    When the threads start it's really fast, my problem seems to be when the pool is create with
    my @pool = map{ threads->create( \&worker, $Qwork, $Qresults ) } 1 .. $THREADS;
Re^2: Sqlite: Threads and inserts into a different database for each one. (1 thread fast, >1 slow)
by GotToBTru (Chaplain) on Apr 07, 2014 at 14:22 UTC

    The money quote here might be "SQLite supports an unlimited number of simultaneous readers, but it will only allow one writer at any instant in time."

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1081383]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2014-09-16 03:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (155 votes), past polls