Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
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 (Priest) 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 scrutinizing the Monastery: (12)
As of 2015-07-03 12:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (53 votes), past polls