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


   **Describe the bug**
   Date type fields are easy to cause query performance degradation when sql is 
written as follow:
   ```
   select dt, count(distinct uv1), count(distinct uv2) from mytable where dt = 
20200909 group by city
   ```
   And the right sql is 
   ```
   select dt, count(distinct uv1), count(distinct uv2) from mytable where dt = 
'2020-09-09' group by city
   ```
   It is twice as fast as below than above in my production environment. (2s vs 
4s)
   
   **To Reproduce**
   Steps to reproduce the behavior:
   1. create a table with dt field and using this field to partition
   ```
   CREATE TABLE `mytable` (
     `dt` date NOT NULL COMMENT "",
     ...
     `uv1` bitmap BITMAP_UNION NOT NULL COMMENT "",
     `uv2` bitmap BITMAP_UNION NOT NULL COMMENT ""
   ) ENGINE=OLAP
   ...
   PARTITION BY RANGE(`dt`)
   ...
   ```
   2. load more data. in my env, uv1 in one day is more then 1500w.
   3. run the sql shown above 
    
   **Expected behavior**
   No matter how you write it the value(2020-09-01/'2020-09-01'/20200901/...) 
in where clause, SQL has the same performance
   
   **Additional context**
   Add any other context about the problem 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:
[email protected]



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

Reply via email to