Filter box triggers multiple queries for each filter control
See original GitHub issueMake sure these boxes are checked before submitting your issue - thank you!
- I have checked the superset logs for python stacktraces and included it here as text if any
- I have reproduced the issue with at least the latest released version of superset
- I have checked the issue tracker for the same issue and I haven’t found one similar
Superset version
0.18.5
Expected results
Filter box on multiple filter controls should run a single query and generate filter options
Actual results
Current filter box generates multiple queries which is inefficient. For eg: I add options A, B, C in Filter control and sum of some column as metric (Though it doesnt make sense to have a metric for filter box). It generates below 4 queries
Select A, B, C, sum() from {subquery} group by A,B,C
Select A, sum() from {subquery} group by A
Select B, sum() from {subquery} group by B
Select C, sum() from {subquery} group by C
It would be great if we can simplify this and remove the option for metric in filter box.
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Filter box triggers multiple queries for each filter control #3073
I'm thinking we need to re-write the whole Filter box component to offer much more functionality, where each filter needs to have its...
Read more >How to cause one graph's filter to trigger several other graphs ...
Use a dashboard filter action so that actions on one worksheet trigger filters on other worksheets. This approach allows multiple selection. I ...
Read more >Displaying filters in the multiple query search engine
User types two queries into search box: drop downs aren't modified,; new bar "applied filters" is displayed,; if user applies filter from drop ......
Read more >Query and filter context | Elasticsearch Guide [8.5] | Elastic
Filter context is in effect whenever a query clause is passed to a filter parameter, such as the filter or must_not parameters in...
Read more >4 Using Filters to Create Queries - Oracle Help Center
Filters let you create queries by specifying multiple values or a range of values (in numeric or date fields) for each field in...
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
Actually it has to run multiple queries as the metric may not be additive (count distinct for instance). Also there could be cardinality issues as the cartesian product may be very large.
We could parallelize them though to save some time.
I’m thinking we need to re-write the whole Filter box component to offer much more functionality, where each filter needs to have its own configuration elements (allow picking a metric or not, sort order, allow-multi-choices, …)
Notice: this issue has been closed because it has been inactive for 257 days. Feel free to comment and request for this issue to be reopened.