Hi, I'm currently looking into SQLite for a website written in PHP. While I don't have any scaling issues yet, I've been looking into how to optimize SQLite performance, especially with regard to transactions. In essence what I'm looking for is a way to defer database writes in a process so that they can all be done at once. However, while I'm accumulating update queries, I would like other processes to be able to both read from and write to the database, and only lock the file for writing once a commit is issued in a process. In looking at the documentation, it seems as though once an update command is issued in a transaction the process gets a RESERVED lock, which (if I remember correctly) means that any other process that attempts to either add an update query to its own transaction or commit the transaction is unable to do so, and therefore blocks until the transaction commits on the process with the lock.
I'm sure there are very good data integrity reasons against this particular feature. All I can say is that in my case there's no danger in performing these updates simultaneously. One solution is that in each process I could accumulate the text of the queries I wish to invoke in an array, then loop down it once I'm ready to write, but I'm wondering if it's possible the SQLite transaction can be made to do this for me automatically. Thanks for your help. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users