egor-ryashin commented on issue #16728: URL: https://github.com/apache/druid/issues/16728#issuecomment-2228938273
Somehow FILTER is 2x slower on my datasource. I tried these two: ``` select "camp", sum(cnt+1) filter (where __time >= '2024-06-01' and __time < '2024-06-07') p, sum(cnt) filter (where __time >= '2024-06-07' and __time < '2024-06-14') n, sum(cnt) filter (where __time >= '2024-06-07' and __time < '2024-06-14') - sum(cnt) filter (where __time >= '2024-06-01' and __time < '2024-06-07') delta from atd_pba where __time >= '2024-06-01' and __time < '2024-06-14' group by 1 order by delta limit 10 ``` ``` select p."ucomp", any_value(p.c), any_value(n.c), any_value(n.c- p.c ) delta from ( select "ucomp" , sum(cnt) c from atd_pba where __time >= '2024-06-01' and __time < '2024-06-07' group by ucomp ) p left join ( select "ucomp" , sum(cnt) c from atd_pba where __time >= '2024-06-07' and __time < '2024-06-14' group by ucomp ) n on p.ucomp is not distinct from n.ucomp group by 1 order by delta limit 10 ``` -- 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...@druid.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org For additional commands, e-mail: commits-h...@druid.apache.org