Dangerous count query

Hi everyone,
We had a bad case of a databse crash because of a mis-usage of 0xdbe, the user simply used the Click to count option you have in the View Query window.
The problem is that when you double-click a table, then a window opens with the first 500 rows of the table, but when the actual query that runs is

select * from <table_name>
So when the user chose to "count" the results of the query what 0xdbe did is select count(*) from (select * from <table_name>).
Our DBA told me this happens on a table that's 1TB large and since this query first creates a temporary table our DB crashed.

To summarize - I think 0xdbe should limit the usage of the Click to count option in such cases.

Thanks,
Guy

3 comments
Comment actions Permalink

Thank you, created: https://youtrack.jetbrains.com/issue/DBE-1059

You are free to create issues too. Please watch the referred one, our developers may ask questions. In particular, do you expect that simple "select count(*) from that_table" should help?

Regards,
Alexander.

0
Comment actions Permalink

Thank you Alexander

I don't see a Watch option anywhere, even though I DID manage to log in...

0
Comment actions Permalink

See "Watchers" control below the attributes box. But you've commented and already auto-added.

Alexander.

0

Please sign in to leave a comment.