On Apr 4, 2008, at 11:11 AM, Dennis Cote dennis.cote-at-......... | 
sqlite| wrote:
> Why do you need two transactions in parallel? In general only one
> connection can have a transaction open on a database at any time.
> Locking is used to serialize transactions. Even with two connections,
> you can't have two active transactions. The second will stall waiting
> for the first to complete.
You're right. I was thinking that using my own synchronization was  
suboptimal, rather than using SQLite's built-in synchronization that  
exists for transaction management. I was also thinking that I'd be  
able to process data coming in and execute the INSERTs in parallel  
transactions then only be blocked at the COMMIT, but of course I had  
forgotten about the coarse-grain locking that SQLite uses, so it  
wouldn't work the way I was thinking it would anyway.


_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to