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)

Replies are listed 'Best First'.
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 (Prior) 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."