by Serge » Mon Apr 11, 2011 6:14 pm
We can implement "show row count" function for custom queries but actually it is quite ambiguous feature.
1. Some databases doesn't support nested selects. Its impossible to query row count without nested select for most queries.
2. For many selects count(*) will work much longer than select itself because select fetches just first N rows in DBeaver while count(*) must fetch all rows on server side. Moreover select may generate infinite (or too long) resultset so any aggregate function can't and won't be executed and will just hang forever.
3. Select count(*) for complex queries may eat a lot of resources on server-side. I know cases when count(*) on very complex query on Oracle eats tons of memory and hangs database server for a pretty long period of time or even leads to server crash .
Anyway, I agree, it is very usefull and convenient feature in many cases.
Resume:
- we won't add automatic row count calculation for executed queries
- we will implement special command (which can be executed by shortcut, from context menum, etc) which will select row count for current query. Similar to "explain execution plan" feature. This feature will be implemented in one of following versions.
Thanks!