On 27 May 2015, at 11:00am, gunnar <gharms at hiqinvest.nl> wrote: > SELECT * > FROM ordercallback cb > WHERE sessionuuid=@SESSIONUUID > AND endstate=0 > AND working=1 > AND cb_seq_num=( > SELECT max(cb_seq_num) > FROM ordercallback > WHERE server_order_id=cb.server_order_id > AND sessionuuid=cb.sessionuuid AND working=1);
As Dr Hipp has pointed out, SQLite locks the entire database during the whole of your SELECT *, so any other process should not be interrupting your query once it has got started. Purely for research and not as a permanent solution, have you tried splitting your query up into two ? First do the subSELECT, returning what I think should be a single value, then do the main SELECT. You might be able to figure out which one is being interrupted. Simon.