Hi,
Sometimes when I execute (from the sqlite_shell program) a select-query
that contains a correlated subquery that query gets 'stuck'. It outputs
part of the expected results and then doesn't come back to command
prompt and also doesn't output any more records.
I suspect it is because another process is inserting records in the
table from which I try to select during the time that my query runs. At
least my query never gets stuck when that other process is not doing
anything on the table.
What I would like to know is if my assumption is right, and most
importantly if it is really the case that the query will never get stuck
if no other process is manipulating the same table.
The query is:
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);
Regards,
Gunnar