in reply to Re^4: DBIx::Class and Parallel SQLite Transactions
in thread DBIx::Class and Parallel SQLite Transactions
But as I previously mentioned, this appears to be an issue with how the lock state of the database is handled.
The write performance of SQLite will be far less than say MySQL. SQLite needs to gain an exclusive lock on the entire DB file in order to do a write. There is no table level or row level locking. So I figure that having multiple writers will bring nothing but trouble to you. Since in a transaction your rows are exclusive (don't overlap with other transactions), then a DB that can do row level locking could yield a lot higher performance.
I am working on a SQLite project and have found the O'Reilly book, "Using SQLite" by Jay A. Kreibich to be helpful. It is mainly oriented around the C interface, but there is plenty of great info for the Perl users too. There are discussions about how and why the DB can be busy - it is locking related.
Update: Oh, I'm not sure how well the DBI does with threads. The implementation may be "safe", but not high performance, i.e. it may just wind up serializing things. With MySQL, you may get higher performance with a process per writer instead of a thread. Benchmarks will tell.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: DBIx::Class and Parallel SQLite Transactions
by learnedbyerror (Monk) on Jul 14, 2011 at 20:30 UTC | |
by Marshall (Canon) on Jul 14, 2011 at 21:57 UTC |