WChCh opened a new issue #8555: Global "prequery" for dashboard
URL: https://github.com/apache/incubator-superset/issues/8555
 
 
   My dashboard has many charts,  the query written by jinja template in every 
chart has the same sub query like `book in (select book from library group by 
book order by count(book) desc limit 3) ` or  `book in (select book from 
library group by book order by count(book) desc limit 1) `. The queries with 
same sub query  away take long time and easy to be out of memory for big data!  
So a "prequery" is very useful for long running query.
   
   "prequery" had worked for Druid in #4163,  but it could not work for all db 
engine, and other charts could not share the same topN result. 
   
   So a new feature is that, the "prequery" should execute when triggering  
filter box, and we get the result of Top 3, then the query in each chart get 
the result of Top 3  or the Top1 from the  result of Top 3 as the `where in ` 
condition, example like that:
   ```
   select book from library group by book order by count(book) desc limit 3
   ```
   The result of Top 3 is `book1, book2, book3`
   so we can use `book in ('book1')`  as the Top 1 condition, use `book in 
('book1','book2','book3')` as the Top 3 condition, the most Important is that 
the "prequery" just run one time for all charts, and don`t  need any nested sub 
query.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to