# Predicate Push Down 
```
SELECT * FROM t1 LEFT JOIN t2 ON t1.key = t2.key WHERE t1.val > 11 and t2.val > 22;  
——>
SELECT * FROM t1 INNER JOIN t2 ON t1.key = t2.key WHERE t1.val > 11 and t2.val > 22;
```
------------------------------------------------------------
A very important optimization rule for logical optimization is predicate push down. We can understand that after making reasonable changes to the Selection logic operator, the filter condition is pushed closer to the leaf node. The leaf node here is the TiKV node in the TiDB Cluster. Such a push down process will reduce data access and save computation overhead. If the selection operator cannot be pushed down, it will be rewritten as a new plan.
For example, when an outer join is converted to inner join, the optimizer will transform the predicate push down

The modify SQL logic is changed to the INNER JOIN method, and the intersection calculation needs to be performed, because in addition to the predicate of the association condition, there is also a separate filter for the related table. In order to improve the efficiency of TiDB Server aggregation calculation and reduce unnecessary computation overhead, t1.val > 11 and t2.val > 22 can be pushdown. The TiKV of the node is calculated.

The original SQL statement is the left outer join of the t1 table and the t2 table, then all rows of the t1 table must match t2. If there is no matching row in the t2 table, t2 will add NULL in the result set. In the predicate, you can see that “t1.key = t2.key” will filter out all result sets containing NULL, so the outer join (LEFT JOIN) here can be modify to inner join (INNER JOIN) for intersection calculation, and the intermediate result sets that do not meet the conditions will be filtered out by JOIN.
