Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I interrupt a "Count Rows" operation in SQL Developer?

When I execute a query and right click in the results area, I get a pop-up menu with the following options:

  • Save Grid as Report ...
  • Single Record View ...
  • Count Rows ...
  • Find/Highlight ...
  • Export ...

If I select "Count Rows", is there a way to interrupt the operation if it starts taking too long?

like image 768
ErikR Avatar asked Apr 11 '12 16:04

ErikR


2 Answers

No, you don't seem to be able to.

When you select Count Rows from the context menu, it runs the count on the main UI thread, hanging the whole UI, potentially for minutes or hours.

It's best not to use that feature - just put select count (*) from ( < your query here>) which it runs properly on separate thread which can be cancelled.

like image 78
AndyW Avatar answered Sep 24 '22 08:09

AndyW


You can open an new instance of sql developer and kill the session counting the rows. I do suggest using the select count(*) query though as it is less painful in the long run.

like image 35
user3631812 Avatar answered Sep 24 '22 08:09

user3631812