简体   繁体   English

方解石谓词下推

[英]Calcite Predicate Push Down

Source SQL来源 SQL

SELECT  e . *
FROM    emp e
INNER JOIN    dept d
ON      e.deptno = d.deptno
AND     emp.deptno = 5;

After Optimzie优化后

select
  e.
from
  (
    select
      *
    from
      emp
    where
      emp.deptno = 5
  ) e
  inner join (
    select
      *
    from
      deptno
    where
      deptno = 5
  ) on on e.deptno = d.deptno;

Does Calcite have this optimization rule? Calcite 有这个优化规则吗?

Yes, there was CoreRules.JOIN_CONDITION_PUSH .是的,有CoreRules.JOIN_CONDITION_PUSH But the only emp.deptno = 5 can be pushed into table emp.但是只有emp.deptno = 5 可以推入表emp。 The transitive conditioin can be implement by your self.传递条件可以由您自己实现。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM