You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No, there is no way to interrupt a query. And unfortunately it's not that easy to fix because of the way SQLite works. As far as I can see we'd have to put the query execution into a separate thread which we can kill from the UI thread at any time - but this requires too much code restructuring to have it happen soon. I'm also not sure if this can somehow cause data loss in the database, so I'm not sure if it's wise to add an easy option which might encourage users to cause unwanted damages.
So in short, I'm not sure on this. But let's keep the issue open as a reminder and maybe come back to it later 😃
Hello Martin,
I understand your concerns. Perhaps just as information: SQLite Studio shows up an interrupt button when a query is engaged, works fine, so far no problems, but not heavily used anyway.
I came to this, because by un(for)seen changes at my collected measurement data I run into troubles with my (old) queries: SQLite Studio could interrupt them, SQLite Browser I had to kill each time ...
Personally I much more like SQLite Browser; I use SQLite Studio for some work because here I can attach a bunch of databases by a set of query statements, which SQLite Browser cannot.
please add this :) Not an SQL expert but it should be fairly safe to execute query as a transaction in separate thread and revert the transaction on thread interruption...?
@zwrmueller@mglatz Sorry for the long delay here. Are you still interested in this issue? I'm asking because we are currently preparing some changes which add, besides making some other changes, a cancel button. Because it's changing a lot of our code we want to test this as good as we can. Are you interested in giving it a try? You can find the Windows and OSX build here:
I was really hoping to see this in the alpha released recently. It seems to work quite well.
however switching to other tab while query is executing (eg the pragmas tab) displays the "query is runnging" message and there the app seems to freeze
I did some more testing and its not as flawless as i thoguht
Db browser still freezes on queries with large (15M records) tables. It seems that cancelling the query within first few seconds works but once it runs for 10 or more seconds, it cannot be cancelled anymore
running select stement un-greys (enables) the write and revert changes buttons (it should not do that)
calcelling the query leaves the result window in random states. Once I see some "loading" records, other time there are some values and some "loading" etc. Once the query is cancelled the results should be cleared.
Confused why the existing SQLite interrupt api, "void sqlite3_interrupt(sqlite3*);" means "a lot of code changes"?
Think of DB4S as a car. SQLite is the engine. The engine has a sensor that tells you whether its running or not, and even how many revs its doing. You devise a convoluted system (no offense...) to take that sensor's output and display it to the user in some rev counter using LEDs. Pretty. Works OK. But someone else now wants it connected to a rotary dial display. "Its only a sensor. Should be easy". However, all the plumbing, design and wiring is geared towards getting the output of that sensor to power LEDs. Its going to have be ripped out and redesigned to work for an analogue needle, rather than digital LEDs.
Or something.
Basically, the code in DB4S isn't geared up that way, and to make it so, would require a lot of code changes. We're exceeding 300 issues as it is, with a finite list of programmers. Its a lot of work. If we had teams of programmers on standby bored waiting for input, then it could be done....
I mean no disrespect, as I use DB4S sometimes daily. 😄
The car analogy is fine. The interrupt api = turning off the ignition. The car's systems are presented with no power and must act accordingly.
It is already mentioned that users(and me 👿) have to use TaskMgr to kill hung DB4S processes.
Can that be any worse than DB4S attempting a sqlite3_interrupt() from a single gui button?
Closing this issue as it looks like it has been fixed a while ago and we didn't hear anything since then. Feel free to reopen this issue if the problem still occurs.
Activity
justinclift commentedon Oct 2, 2015
Good question. I don't think there's a way yet, but it would make sense to add one. 😄
MKleusberg commentedon Oct 5, 2015
No, there is no way to interrupt a query. And unfortunately it's not that easy to fix because of the way SQLite works. As far as I can see we'd have to put the query execution into a separate thread which we can kill from the UI thread at any time - but this requires too much code restructuring to have it happen soon. I'm also not sure if this can somehow cause data loss in the database, so I'm not sure if it's wise to add an easy option which might encourage users to cause unwanted damages.
So in short, I'm not sure on this. But let's keep the issue open as a reminder and maybe come back to it later 😃
zwrmueller commentedon Oct 6, 2015
Hello Martin,
I understand your concerns. Perhaps just as information: SQLite Studio shows up an interrupt button when a query is engaged, works fine, so far no problems, but not heavily used anyway.
I came to this, because by un(for)seen changes at my collected measurement data I run into troubles with my (old) queries: SQLite Studio could interrupt them, SQLite Browser I had to kill each time ...
Personally I much more like SQLite Browser; I use SQLite Studio for some work because here I can attach a bunch of databases by a set of query statements, which SQLite Browser cannot.
Regards
Ralf
mglatz commentedon Oct 6, 2017
please add this :) Not an SQL expert but it should be fairly safe to execute query as a transaction in separate thread and revert the transaction on thread interruption...?
MKleusberg commentedon Oct 18, 2018
@zwrmueller @mglatz Sorry for the long delay here. Are you still interested in this issue? I'm asking because we are currently preparing some changes which add, besides making some other changes, a cancel button. Because it's changing a lot of our code we want to test this as good as we can. Are you interested in giving it a try? You can find the Windows and OSX build here:
mglatz commentedon Oct 18, 2018
I was really hoping to see this in the alpha released recently. It seems to work quite well.
however switching to other tab while query is executing (eg the pragmas tab) displays the "query is runnging" message and there the app seems to freeze
mglatz commentedon Oct 18, 2018
I did some more testing and its not as flawless as i thoguht
justinclift commentedon Oct 18, 2018
Thanks for checking @mglatz, that's definitely weirdness that needs fixing. 😉
robert-dodier commentedon Jan 23, 2019
For what it's worth, I'd also like to see an interrupt feature.
sky5walk commentedon Jan 23, 2019
Confused why the existing SQLite interrupt api, "void sqlite3_interrupt(sqlite3*);" means "a lot of code changes"?
chrisjlocke commentedon Jan 23, 2019
Think of DB4S as a car. SQLite is the engine. The engine has a sensor that tells you whether its running or not, and even how many revs its doing. You devise a convoluted system (no offense...) to take that sensor's output and display it to the user in some rev counter using LEDs. Pretty. Works OK. But someone else now wants it connected to a rotary dial display. "Its only a sensor. Should be easy". However, all the plumbing, design and wiring is geared towards getting the output of that sensor to power LEDs. Its going to have be ripped out and redesigned to work for an analogue needle, rather than digital LEDs.
Or something.
Basically, the code in DB4S isn't geared up that way, and to make it so, would require a lot of code changes. We're exceeding 300 issues as it is, with a finite list of programmers. Its a lot of work. If we had teams of programmers on standby bored waiting for input, then it could be done....
sky5walk commentedon Jan 23, 2019
I mean no disrespect, as I use DB4S sometimes daily. 😄
The car analogy is fine. The interrupt api = turning off the ignition. The car's systems are presented with no power and must act accordingly.
It is already mentioned that users(and me 👿) have to use TaskMgr to kill hung DB4S processes.
Can that be any worse than DB4S attempting a sqlite3_interrupt() from a single gui button?
justinclift commentedon Jan 23, 2019
That sums things up pretty well. 😄
MKleusberg commentedon Feb 10, 2023
Closing this issue as it looks like it has been fixed a while ago and we didn't hear anything since then. Feel free to reopen this issue if the problem still occurs.