You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/10/08 15:22:12 UTC

[GitHub] [superset] Dr9vik opened a new issue #17036: time series {name} chart and command join

Dr9vik opened a new issue #17036:
URL: https://github.com/apache/superset/issues/17036


   this is standart time series bar chart:
   ![vivaldi_0MqYMCNKc7](https://user-images.githubusercontent.com/36520921/136579194-d97d2bbd-a971-44d9-bc02-fc982276b61b.png)
   
   query:
   ```
   SELECT DATE(order_date, -strftime('%d', order_date) || ' days', '+1 day') AS __timestamp,
          deal_size AS deal_size,
          sum(sales) AS "(Sales)"
   FROM "Vehicle Sales"
   JOIN
     (SELECT deal_size AS deal_size__,
             sum(sales) AS mme_inner__
      FROM "Vehicle Sales"
      WHERE order_date >= '2003-01-01 00:00:00.000000'
        AND order_date < '2005-06-01 00:00:00.000000'
      GROUP BY deal_size
      ORDER BY mme_inner__ DESC
      LIMIT 100
      OFFSET 0) AS anon_1 ON deal_size = deal_size__
   WHERE order_date >= '2003-01-01 00:00:00.000000'
     AND order_date < '2005-06-01 00:00:00.000000'
   GROUP BY deal_size,
            DATE(order_date, -strftime('%d', order_date) || ' days', '+1 day')
   ORDER BY "(Sales)" DESC
   LIMIT 50000
   OFFSET 0;
   ```
   
   request that should have been:
   ```
   SELECT DATE(order_date, -strftime('%d', order_date) || ' days', '+1 day') AS __timestamp,
          deal_size AS deal_size,
          sum(sales) AS "(Sales)"
   FROM "Vehicle Sales"
   WHERE order_date >= '2003-01-01 00:00:00.000000'
     AND order_date < '2005-06-01 00:00:00.000000'
   GROUP BY deal_size,
            DATE(order_date, -strftime('%d', order_date) || ' days', '+1 day')
   ORDER BY "(Sales)" DESC
   LIMIT 50000
   OFFSET 0;
   ```
   why does superset add this request?
   ```
   JOIN
     (SELECT deal_size AS deal_size__,
             sum(sales) AS mme_inner__
      FROM "Vehicle Sales"
      WHERE order_date >= '2003-01-01 00:00:00.000000'
        AND order_date < '2005-06-01 00:00:00.000000'
      GROUP BY deal_size
      ORDER BY mme_inner__ DESC
      LIMIT 100
      OFFSET 0) AS anon_1 ON deal_size = deal_size__
   
   ```
   This JOIN increases the data loading time
   Old superset works fine
   


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] junlincc commented on issue #17036: time series {name} chart and command join

Posted by GitBox <gi...@apache.org>.
junlincc commented on issue #17036:
URL: https://github.com/apache/superset/issues/17036#issuecomment-941540329


   @Dr9vik I couldn't think about what have changed, it is weird. 
   Couple of questions: 1. can you switch to  time series bar chart v2 in latest version and see the query is different (without JOIN)?
   2. Is it only impacting the performance or is it also returning the wrong data?


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] rumbin edited a comment on issue #17036: time series {name} chart and command join

Posted by GitBox <gi...@apache.org>.
rumbin edited a comment on issue #17036:
URL: https://github.com/apache/superset/issues/17036#issuecomment-941584108


   I suppose this is caused by the series limit being set to 100.
   
   Seems to be a duplicate of #17035.
   
   Please try removing the series limit and see whether the subquery will disappear.


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] rumbin edited a comment on issue #17036: time series {name} chart and command join

Posted by GitBox <gi...@apache.org>.
rumbin edited a comment on issue #17036:
URL: https://github.com/apache/superset/issues/17036#issuecomment-941584108


   I suppose this is caused by the series limit being set to 100.
   
   This is quite often discussed. Right now in #17035, for example.
   
   Please try removing the series limit and see whether the subquery will disappear.


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] rumbin commented on issue #17036: time series {name} chart and command join

Posted by GitBox <gi...@apache.org>.
rumbin commented on issue #17036:
URL: https://github.com/apache/superset/issues/17036#issuecomment-941584108


   I suppose this is caused by the series limit being set to 100.
   AFAIK, older charts implemented the series limit as a subquery. This was and still is often discussed. I think that there is even an ongoing discussion in some GitHub issue right now.
   
   Please try removing the series limit and see whether the subquery will disappear.


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] rumbin edited a comment on issue #17036: time series {name} chart and command join

Posted by GitBox <gi...@apache.org>.
rumbin edited a comment on issue #17036:
URL: https://github.com/apache/superset/issues/17036#issuecomment-941584108






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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] rumbin commented on issue #17036: time series {name} chart and command join

Posted by GitBox <gi...@apache.org>.
rumbin commented on issue #17036:
URL: https://github.com/apache/superset/issues/17036#issuecomment-941584108


   I suppose this is caused by the series limit being set to 100.
   AFAIK, older charts implemented the series limit as a subquery. This was and still is often discussed. I think that there is even an ongoing discussion in some GitHub issue right now.
   
   Please try removing the series limit and see whether the subquery will disappear.


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] junlincc commented on issue #17036: time series {name} chart and command join

Posted by GitBox <gi...@apache.org>.
junlincc commented on issue #17036:
URL: https://github.com/apache/superset/issues/17036#issuecomment-941540329


   @Dr9vik I couldn't think about what have changed, it is weird. 
   Couple of questions: 1. can you switch to  time series bar chart v2 in latest version and see the query is different (without JOIN)?
   2. Is it only impacting the performance or is it also returning the wrong data?


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org