Skip to content

Commit de3650c

Browse files
Oreoxmtqiancai
andauthored
Apply suggestions from code review
Co-authored-by: Grace Cai <[email protected]>
1 parent fe416a4 commit de3650c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

optimizer-hints.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ EXPLAIN SELECT /*+ INDEX_LOOKUP_PUSHDOWN(t1, a) */ a, b FROM t1;
500500
+-----------------------------+----------+-----------+----------------------+--------------------------------+
501501
```
502502

503-
开启 `INDEX_LOOKUP_PUSHDOWN` Hint 后,执行计划中原本位于 TiDB 侧的最外层 Build 算子会被替换为 `LocalIndexLookUp`,并下推到 TiKV 执行。TiKV 在扫描索引的同时,会尝试在本地回表读取行数据。由于索引和行数据可能分布在不同的 Region,下推到 TiKV 的请求可能无法覆盖所有目标行。因此,执行计划中仍会保留 TiDB 侧的 `TableRowIDScan` 算子,用于补齐未在 TiKV 侧命中的行数据。
503+
使用 `INDEX_LOOKUP_PUSHDOWN` Hint 后,执行计划中原本位于 TiDB 侧的最外层 Build 算子会被替换为 `LocalIndexLookUp`,并下推到 TiKV 执行。TiKV 在扫描索引的同时,会尝试在本地回表读取行数据。由于索引和行数据可能分布在不同的 Region,下推到 TiKV 的请求可能无法覆盖所有目标行。因此,执行计划中仍会保留 TiDB 侧的 `TableRowIDScan` 算子,用于补齐未在 TiKV 侧命中的行数据。
504504

505505
`INDEX_LOOKUP_PUSHDOWN` Hint 目前存在以下限制:
506506

0 commit comments

Comments
 (0)