Skip to content

Commit a0c0161

Browse files
authored
fix the operator info (#15393)
1 parent d20c4b1 commit a0c0161

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

correlated-subquery-optimization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,4 +101,4 @@ explain select * from t1 where t1.a < (select sum(t2.a) from t2 where t2.b = t1.
101101
+------------------------------------------+-----------+-----------+------------------------+--------------------------------------------------------------------------------------+
102102
```
103103

104-
在执行了关闭关联规则的语句后,可以在 `IndexRangeScan_25(Build)``operator info` 中看到 `range: decided by [eq(test.t2.b, test.t1.b)]`。这部分信息就是关联依赖未被解除时,TiDB 使用关联条件进行索引范围查询的显示结果。
104+
在执行了关闭关联规则的语句后,可以在 `IndexRangeScan_42(Build)``operator info` 中看到 `range: decided by [eq(test.t2.b, test.t1.b)]`。这部分信息就是关联依赖未被解除时,TiDB 使用关联条件进行索引范围查询的显示结果。

explain-subqueries.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ EXPLAIN SELECT * FROM t1 WHERE id IN (SELECT t1_id FROM t2);
6868

6969
```
7070

71-
由上述查询结果可知,TiDB 通过索引连接操作 `| IndexJoin_14` 将子查询做了连接转化。该执行计划首先在 TiKV 侧通过索引扫描算子 `└─IndexFullScan_31` 读取 `t2.t1_id` 列的值,然后由 `└─StreamAgg_39` 算子的部分任务在 TiKV 中对 `t1_id` 值进行去重,然后采用 `├─StreamAgg_49(Build)` 算子的部分任务在 TiDB 中对 `t1_id` 值再次进行去重,去重操作由聚合函数 `firstrow(test.t2.t1_id)` 执行;之后将操作结果与 `t1` 表的主键相连接,连接条件是 `eq(test.t1.id, test.t2.t1_id)`
71+
由上述查询结果可知,TiDB 通过索引连接操作 `IndexJoin_15` 将子查询做了连接转化。该执行计划首先在 TiKV 侧通过索引扫描算子 `└─IndexFullScan_26` 读取 `t2.t1_id` 列的值,然后由 `└─StreamAgg_34` 算子的部分任务在 TiKV 中对 `t1_id` 值进行去重,然后采用 `├─StreamAgg_44(Build)` 算子的部分任务在 TiDB 中对 `t1_id` 值再次进行去重,去重操作由聚合函数 `firstrow(test.t2.t1_id)` 执行;之后将操作结果与 `t1` 表的主键相连接,连接条件是 `eq(test.t1.id, test.t2.t1_id)`
7272

7373
## Inner join(有 `UNIQUE` 约束的子查询)
7474

0 commit comments

Comments
 (0)