Make sure these boxes are checked before submitting your issue - thank you!
0.18.5
Filter box on multiple filter controls should run a single query and generate filter options
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.
Anyone has any pointers on how the code can be modified to improve the efficiency of filters will be helpful.
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, ...)
Thanks for the response. However, I did not understand the need for a metric in Filter box. Cant we do a simple distinct for each filter option? Also I agree with additional config elements for each filter. Such as allow single choice vs multi choice. Radio box, Check box, etc.
Thanks
The metric can be nice as it sorts the values based on the metric. Say if we have a filter on the "Market" dimension at Airbnb it would show the biggest markets on top.
Ok. That makes sense to me now.
Probably then having defined number of queries trigger in parallel might help speed up.
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.
Most helpful comment
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, ...)