Which SQLite version? Which operating system? Where is the database file located? Local storage or network drive? WAL mode or journal mode? What does "pragma integrity_check;" return? Is there a busy handler involved (in either process)? Is there an interconnection between the two processes (e.g. process 1 reads data and sends it off to process 2 that tries to modify stuff)? How are you binding values to the SESSIONUUID variable using the sqlite shell alone?
-----Urspr?ngliche Nachricht----- Von: gunnar [mailto:gharms at hiqinvest.nl] Gesendet: Mittwoch, 27. Mai 2015 12:01 An: General Discussion of SQLite Database Betreff: [sqlite] Query containing correlated subquery gets "stuck" 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 _______________________________________________ sqlite-users mailing list sqlite-users at mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users ___________________________________________ Gunter Hick Software Engineer Scientific Games International GmbH FN 157284 a, HG Wien Klitschgasse 2-4, A-1130 Vienna, Austria Tel: +43 1 80100 0 E-Mail: hick at scigames.at This communication (including any attachments) is intended for the use of the intended recipient(s) only and may contain information that is confidential, privileged or legally protected. Any unauthorized use or dissemination of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender by return e-mail message and delete all copies of the original communication. Thank you for your cooperation.