doris3.0.1(存算分离) 相同sql 不同写法fe解析时间相差很大

Viewed 42

查询1:
select a,b,c where table1 where datekey>='20240101' and datekey<='20241001' and event in ('A','B')
image.png

查询2:
select a,b,c where table1 where datekey>='20240101' and datekey<='20241001' and event='A' union all select a,b,c where table1 where datekey>='20240101' and datekey<='20241001' and event='B'
image.png

查询的表是paimon外部表

1 Answers

查看执行计划:scanRange相差很大。
查询1:
image.png

查询2:
image.png
image.png