On 5 Sep 2011, at 6:04pm, Stephan Beal wrote:

> On Mon, Sep 5, 2011 at 6:59 PM, Dan Kennedy <[email protected]> wrote:
> 
>> You could get the same effect by wrapping your loop in a BEGIN/COMMIT
>> block.
> 
> Out of curiosity: would a BEGIN/ROLLBACK be equivalent for this case (where
> only SELECTs are used)?

It should be.  However, if you have a multi-user, multi-process or multi-thread 
setup, please make absolutely certain that you handle all SQLite result codes 
apart from SQLITE_OK correctly.  If you don't have to worry about 
multi-anything, then you shouldn't see anything alarming.

Looking at your original SELECT, by the way ...

> "SELECT value FROM t WHERE t_id=? AND name=?"

I hope you have an index that can be used to look those two values up quickly.

Simon.
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to