SwiftMango
SwiftMango

Reputation: 15284

Async/Non-blocking Query in sqldeveloper

I have a long running (simplified) query like:

BEGIN
  FOR i in (SELECT * FROM T WHERE ....)
  LOOP
    DMBS_OUTPUT.PUT_LINE(i.VALUE);
  END LOOP;
END;
/

When I execute it, it takes hours due to large table and complex condition, and my sqldeveloper is basically frozen on that session. I cannot create a new connection, and I have to open a new sqldeveloper instance.

Is there anyway to not block it? Like running in the background, but still output to the console/file? I understand I can create SQL script and run from CLI, but I would like to know if there is any solution in sqldeveloper itself.

Upvotes: 3

Views: 601

Answers (2)

user5683823
user5683823

Reputation:

While one query is running, simply press ALT + F10 (function key F10) to start another connection, for the same or a different user. The running query will continue to run and will not interfere with your other session.

Upvotes: 0

Gurwinder Singh
Gurwinder Singh

Reputation: 39477

You can open a new private SQL worksheet, which will not share the connection, by clicking the highlighted icon:

enter image description here

Any query running in the unshared sheet will have no effect on your regular SQL worksheet as it doesnt share the connection with it.

Hope this helps.

Upvotes: 2

Related Questions