pingcap/tidb

Executor, Planner: convert in_subquery to hash joins when in_subquery just involves one column

開放

#13,972 建立於 2019年12月9日

 (1 則留言) (0 個反應) (1 位負責人)Go (6,186 個分叉)batch import
help wantedsig/executionsig/plannertype/enhancement

倉庫指標

星標
 (40,090 顆星)
PR 合併指標
 (平均合併 14天 4小時) (30 天內合併 346 個 PR)

描述

Feature Request

Is your feature request related to a problem? Please describe:

select * from S where S.a in (select a from T); where s.a and t.a are nullable. in TiDB, this query is converted to a NestLoopJoin, which is time-consuming. in Mysql, this query is transformed into looking up a materialized table using an equal key, which is like a hash join.

Describe the feature you'd like:

Supporting a nullable join key in current hash join of TiDB, NOTE only one key. Otherwise, it should take the NestLoopJoin .

Describe alternatives you've considered:

Teachability, Documentation, Adoption, Migration Strategy:

https://dev.mysql.com/doc/refman/8.0/en/subquery-materialization.html

貢獻者指南