
TiDB 支持的 Join 算法

Index Nested Loop Join(INLJ)

类似 MySQL 5.7
适合:小表驱动大表 + 有索引
最常见

Hash Join

(重点)

TiDB 默认最常用
构建 hash 表(build side)
探测匹配(probe side)

适合:
大表 join
无索引场景
Hash Join: build hash on smaller table, then probe with larger tableHash Join: build hash on smaller table, then probe w…