question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Filter box triggers multiple queries for each filter control

See original GitHub issue

Make 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:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
mistercrunchcommented, Aug 7, 2017

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, …)

0reactions
mistercrunchcommented, Apr 23, 2018

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found