# Data Access Paths and Row Set Operations
![`smart`](CostBasedSQLPhysicalOptimization02_aa_004_20230922.png)
------------------------------------------------------------------------------
The slide illustrates the various data access paths and row set operations that cost-based optimization can consider to develop the optimal execution plan. Additionally, during the logical transformation stage, the query is already rewritten to accommodate predicate push-down. In the cost-based optimization stage, TiKV expression push-down is further implemented when feasible at the TiKV layer. We have outlined the typical methods here.

Moreover, determining the appropriate algorithm for certain SQL operations, such as aggregation, join, and sorting, is crucial. For example, the aggregation operation might employ either `HASH_AGG` or `STREAM_AGG`, while the join operation can choose from `HASH JOIN`, `MERGE JOIN`, or `INDEX JOIN`. Similarly, there are several options available for the sorting operation.

Finally, the term "expression push-down" refers to transferring the computation of expressions from the TiDB server to TiKV servers, enabling these computations to occur within the coprocessor module of the TiKV servers. The current list of expressions that can be pushed down is available at: [https://docs.pingcap.com/tidb/stable/expressions-pushed-down](https://docs.pingcap.com/tidb/stable/expressions-pushed-down).