crate-admin
crate-admin copied to clipboard
Add a button in the console to cancel the currently running query
While it is possible to open a separate browser tab, query sys.jobs and issue a kill command, it would be really handy to have a button directly in the console to cancel the currently running query.
Related with https://github.com/crate/crate-admin/issues/675
Any tip on how to easily reproduce a long timed query to develop/test this?
Dear @surister,
It looks like CrateDB does not implement pg_sleep. However, @proddata referenced a sleep function over at https://github.com/crate/crate/issues/14511.
SELECT sleep(6000);
On the other hand, I can't find a corresponding definition anywhere. It is probably defined per user defined function ^1, i.e. written in JavaScript?
With kind regards, Andreas.
Hi,
UDFs are a particular case when it comes to terminating queries I think, but you can simply run a large INSERT INTO like:
CREATE TABLE tbl1 (a text);
INSERT INTO tbl1
SELECT a.b::text
FROM generate_series(1,100000000) a(b);