请教一下scanOrToUnionLimit和scanOrToUnionThreshold这两个参数是什么作用

【详述】请教一下scanOrToUnionLimit和scanOrToUnionThreshold这两个参数是什么作用,多个union大表操作占用cpu和内存较多,想看看有没有参数可以控制cpu占用

这个是把or 拆成多个 union. 例如 select from t where a > 0 or b < 0 => select from t where a > 0 union select from t where !(a > 0) and b < 0.
你可能需要的是多阶段调度 https://github.com/StarRocks/starrocks/pull/51033 通过 enable_phased_scheduler=true; 开启

感谢大佬解答

大佬,请教一下,使用过程中发现部分场景的union或or的大表查询,sr的性能表现会比trino差,有什么调参建议么

给个具体的例子,query profile 对比下看看

看了一下执行计划,是scan数据慢,扫描了30tb数据,数据在s3上,大佬有调参建议么

https://github.com/StarRocks/starrocks/pull/60223 可以patch一下这个试下,怀疑是这个问题

set scan_or_to_union_limit = -1 试一下