You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2021/03/02 11:49:52 UTC

[GitHub] [incubator-doris] xinghuayu007 opened a new issue #5443: [Rewrite] Rewrite from_unixtime to reduce calling this function

xinghuayu007 opened a new issue #5443:
URL: https://github.com/apache/incubator-doris/issues/5443


   **Is your feature request related to a problem? Please describe.**
   
   from_unxitime is a cpu-exhausted function. SQL: `select filed from table where from_unixtime(field) > '2021-03-02'`, if there are one million rows of data. Function from_unixtime will be called one million times, which will make query very slow.
   
   **Describe the solution you'd like**
    SQL: `select filed from table where from_unixtime(field) > '2021-03-02'`, 
   we can rewrite this sql into `select filed from table where field > 1614614400`; 
   that means we only need to transfer '2021-03-02' into timestamp, and compare field with this timestamp, it is no need to call function from_unixtime.
   
   **Describe alternatives you've considered**
   A clear and concise description of any alternative solutions or features you've considered.
   
   **Additional context**
   Add any other context or screenshots about the feature request here.
   


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org