Thanks guys. You really helped me. I think I know what I am going to do. You 
see, as I am using a single connection object there is at least one selection 
statement executed at the beginning of each process. Then, during the program 
lifecycle there could be a few updates executed, that use the same connection 
object. So, the transaction that was opened with a SHARED lock would be 
converted to a RESERVED lock until committed. 

Therefore, I am thinking of using separate (local) connections for the routines 
that do the updates, and leaving the global connection object for the selects 
only. I have estimated that there are not a lot of places in the program what 
do SELECT and then UPDATE, so, for these routines I will be doing the 
following: 
1. open new connection
2. execute BEGIN IMMEDIATE
3. do SELECT/UPDATE/DELETE (no change)
4. do the COMMIT (or ROLLBACK in case of an exception)
5. close connection.

For the rest of the program, I will leave the global connection object.

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

Reply via email to