filtering result set in grid by unnamed column fails / and there is an inefficient subquery
See original GitHub issueSystem information:
- Operating system (distribution) and version: Windows 10
- DBeaver version: 21.3.3
Connection specification:
- Database name and version: SQL Server 2016
Describe the problem you’re observing:
When I have a grid with unnamed columns and try filtering on those columns, it fails. And the reason it fails is that the grid dataset is filtered using a subquery! This is not efficient.
I want to filter an already retrieved dataset without re-running the original query as subquery.
Please look at Toad for SQL Server as example: as soon as data is loaded, you can filter it like an Excel table, and there are no additional queries sent to the server.
Steps to reproduce, if exist:
I use SQL server but I guess it will fail in other DB types. Run any query that returns unnamed columns. E.g.
select object_schema_name(object_id), object_name(object_id) from sys.all_objects;
Try filtering on the column.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Join/Subquery is fast/slow depending on which column I filter ...
I guess, in Query B, it is running those subqueries first without filtering, but I don't know how to fix it. The problem...
Read more >Some Top SQL Query Mistakes - Part 1 - Navicat
As a result, all rows are filtered out and the query returns zero rows. This issue can also surface if requirements change, and...
Read more >Invalid sub-query filter. Either data cannot be retrieved (null) or ...
The query contains an invalid sub-query. Either data cannot be retrieved or no result objects are defined. Action. Modify the sub-query.
Read more >Error conditions in Databricks
Databricks Runtime and Databricks SQL. AMBIGUOUS_COLUMN_OR_FIELD. Column or field <name> is ambiguous and has <n> matches. AMBIGUOUS_CONSTRAINT.
Read more >Release notes for SQL Server Management Studio (SSMS)
There is a known problem due to incorrect data in msdb. ... issue where the reordering of XML columns in the "Result Grid"...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Still reproducible in 22.0.0.202203060510.
select object_schema_name(object_id), object_name(object_id) from sys.all_objects;
in any DB in SQL Server.Unfortunately it is not possible to filter by columns with empty name. Generally SQL restricts columns with empty names, it is SQL Server-specific issue.
Workaround: add column aliases: