Just tried sqlite3_interrupt but it didn’t seem to help. I presume there’s no interrupt points within the count() function mentioned in the explain.
________________________________ From: sqlite-users <sqlite-users-boun...@mailinglists.sqlite.org> on behalf of Hick Gunter <h...@scigames.at> Sent: Thursday, May 24, 2018 5:16:45 PM To: 'SQLite mailing list' Subject: Re: [sqlite] [EXTERNAL] sqlite3_progress_handler(D,N,X,P) If you want elapsed milliseconds, you can set a timer and call sqlite3_interrupt() to have sqlite quit executing the query as soon as possible. This interface is based on "work done". I guess the callback routine gets called at the next "interrupt point" (which is why the number N is only approximate) and pretends that you called sqlite3_interrupt() if non-zero was returned. -----Ursprüngliche Nachricht----- Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von x Gesendet: Donnerstag, 24. Mai 2018 17:42 An: sqlite-users@mailinglists.sqlite.org Betreff: [EXTERNAL] [sqlite] sqlite3_progress_handler(D,N,X,P) The parameter N is the approximate number of virtual machine instructions<https://sqlite.org/opcode.html> that are evaluated between successive invocations of the callback X. Would it not have been better if N was the number of milliseconds between invocations? It’s not much use if you want to abort from a lengthy “select count(*) from Tbl” as there are only a couple of virtual machine instructions whereas “select count(*) from Tbl,Tbl” might have billions of VMI’s. _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users ___________________________________________ Gunter Hick | Software Engineer | Scientific Games International GmbH | Klitschgasse 2-4, A-1130 Vienna | FN 157284 a, HG Wien, DVR: 0430013 | (O) +43 1 80100 - 0 May be privileged. May be confidential. Please delete if not the addressee. _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users