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
{{ message }}
Repository navigation
specific query - will make the application not respond anymore #1363
running the query, will make the application not to respond anymore (3.10.1 portable):
WITH RECURSIVE dates(date) AS (
VALUES('2018-04-06')
UNION ALL
SELECT date(date)
FROM dates
WHERE date < '2018-04-10'
)
SELECT date FROM dates;
Useful extra information
correct query is:
WITH RECURSIVE dates(date) AS (
VALUES('2018-04-06')
UNION ALL
SELECT date(date, '+1 day')
FROM dates
WHERE date < '2018-04-10'
)
SELECT date FROM dates;
This kind of sounds like a standard run-away SQL query. eg it's taking much longer than expected, due to the SQL query not being quite right
From faint memory, we don't yet support cancelling queries that are taking too long. 😦 It's something that should be added at some point, but isn't there yet (as far as I remember).
Yeah, I think that's the direction we've started on with things already, but I'm not sure how far along we are. @MKleusberg was getting that done I think.
Note that my head is buried in another project at the moment (CAD/CAM stuff), thus my not remembering details well for where this "make a cancel button work" is up to.
Can you make all queries run from a separate thread?
Its not as simple as a quick one line tweak to the code, as the program has to be geared up for multi-threaded use. The rest of the program and code logic also isn't geared up for it, so unexpected things happen if the user tries to amend tables, switch tabs or do 'weird' things while the GUI isn't locked...
Haha, not suggesting threading is easy. However, I rarely see gui apps without threading. Maybe small utilities, but even a file lister benefits from threading.
My apps process gui events in the main thread. No additional threads can create or populate gui elements. The "worker" threads only notify the main thread of some action to perform or a status update, etc.
Does the nightly build have threading for some actions but not all?
I think the threading bits so far are mainly around fetching data in the background (eg for the Browse Data tab). My dodgy faint memory is also recalling some discussion around threads for the Execute SQL tab... but I don't recall if that was just discussion prior to coding, or if anything has actually been implemented.
Hmmm, that probably doesn't help answer the question. 🤕
changed the title [-]specific query - will make the applciation not to respond anymore[/-][+]specific query - will make the application not respond anymore[/+]on Oct 17, 2018
@flcatalin and @sky5walk 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 to the Execute SQL area and keep the UI more responsive. 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:
Activity
chrisjlocke commentedon Apr 12, 2018
How many rows in that table 'dates' ? Does it come back after a while? Have you an example database you could email me? db4s [at] chrisjlocke.co.uk
justinclift commentedon Apr 12, 2018
This kind of sounds like a standard run-away SQL query. eg it's taking much longer than expected, due to the SQL query not being quite right
From faint memory, we don't yet support cancelling queries that are taking too long. 😦 It's something that should be added at some point, but isn't there yet (as far as I remember).
sky5walk commentedon Apr 12, 2018
Can you make all queries run from a separate thread?
Then, the gui is not blocked and a 'cancel' button can stop or kill the unfinished thread.
justinclift commentedon Apr 12, 2018
Yeah, I think that's the direction we've started on with things already, but I'm not sure how far along we are. @MKleusberg was getting that done I think.
Note that my head is buried in another project at the moment (CAD/CAM stuff), thus my not remembering details well for where this "make a cancel button work" is up to.
chrisjlocke commentedon Apr 12, 2018
Its not as simple as a quick one line tweak to the code, as the program has to be geared up for multi-threaded use. The rest of the program and code logic also isn't geared up for it, so unexpected things happen if the user tries to amend tables, switch tabs or do 'weird' things while the GUI isn't locked...
sky5walk commentedon Apr 12, 2018
Haha, not suggesting threading is easy. However, I rarely see gui apps without threading. Maybe small utilities, but even a file lister benefits from threading.
My apps process gui events in the main thread. No additional threads can create or populate gui elements. The "worker" threads only notify the main thread of some action to perform or a status update, etc.
Does the nightly build have threading for some actions but not all?
justinclift commentedon Apr 12, 2018
I think the threading bits so far are mainly around fetching data in the background (eg for the Browse Data tab). My dodgy faint memory is also recalling some discussion around threads for the Execute SQL tab... but I don't recall if that was just discussion prior to coding, or if anything has actually been implemented.
Hmmm, that probably doesn't help answer the question. 🤕
sky5walk commentedon Apr 12, 2018
Thanks, that helps explain the current threading use in the nightly.
If only for fetching initial data, I can delay updating to latest nightly.
I am on the lookout for threading updates, since I have crashed DB4S sessions many times with runaway queries. :(
[-]specific query - will make the applciation not to respond anymore[/-][+]specific query - will make the application not respond anymore[/+]MKleusberg commentedon Oct 18, 2018
@flcatalin and @sky5walk 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 to the Execute SQL area and keep the UI more responsive. 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: