w517424787 commented on issue #22528:
URL: https://github.com/apache/doris/issues/22528#issuecomment-1666828444

   目前doris在字符串和数字比较时,都统一将字符串转数字进行比较,这样会导致查询出的结果不准确,而且也不会报错。
   
   另外,针对字符串和数字比较时,可以根据字段的类型,将传入的值类型转换为字段类型,提高查询效率,如:
   
   - 如果stat_date是string类型,where stat_date = 20200601  可以转换为 where stat_date = 
cast(20200601  as string),而不是 where cast(stat_date as int) = 20200601 , 
这在数据量很大的时候,性能损耗很严重。
   - 如果stat_date是int类型,where stat_date = '20200601'  可以转换为 where stat_date = 
cast(20200601  as int)  --> 目前这个是已经有了。
   


-- 
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: commits-unsubscr...@doris.apache.org

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


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

Reply via email to