From 996ba2ab4b93bff3d6ec84d51e6b42d770a46307 Mon Sep 17 00:00:00 2001 From: xuhuaiyu <391585975@qq.com> Date: Thu, 18 Mar 2021 16:08:53 +0800 Subject: [PATCH] remove more info --- explain-overview.md | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/explain-overview.md b/explain-overview.md index 50162dc030b1..7afb4d958c3c 100644 --- a/explain-overview.md +++ b/explain-overview.md @@ -240,7 +240,6 @@ TiDB 的 Join 算法包括如下几类: - Merge Join - Index Join (Index Nested Loop Join) - Index Hash Join (Index Nested Loop Hash Join) -- Index Merge Join (Index Nested Loop Merge Join) 下面分别通过一些例子来解释这些 Join 算法的执行过程。 @@ -322,25 +321,6 @@ mysql> EXPLAIN SELECT /*+ INL_HASH_JOIN(t1, t2) */ * FROM t1, t2 WHERE t1.id = t 6 rows in set (0.00 sec) ``` -#### Index Merge Join 示例 - -该算法的使用条件包含 Index Join 的所有使用条件,但还需要添加一条:join keys 中的内表列集合是内表使用的 index 的前缀,或内表使用的 index 是 join keys 中的内表列集合的前缀,该算法相比于 INL_JOIN 会更节省内存。 - -``` -mysql> EXPLAIN SELECT /*+ INL_MERGE_JOIN(t1, t2) */ * FROM t1, t2 WHERE t1.id = t2.id; -+-----------------------------+----------+-----------+------------------------+-------------------------------------------------------------------------------+ -| id | estRows | task | access object | operator info | -+-----------------------------+----------+-----------+------------------------+-------------------------------------------------------------------------------+ -| IndexMergeJoin_16 | 12487.50 | root | | inner join, inner:IndexReader_14, outer key:test.t1.id, inner key:test.t2.id | -| ├─IndexReader_31(Build) | 9990.00 | root | | index:IndexFullScan_30 | -| │ └─IndexFullScan_30 | 9990.00 | cop[tikv] | table:t1, index:id(id) | keep order:false, stats:pseudo | -| └─IndexReader_14(Probe) | 1.00 | root | | index:Selection_13 | -| └─Selection_13 | 1.00 | cop[tikv] | | not(isnull(test.t2.id)) | -| └─IndexRangeScan_12 | 1.00 | cop[tikv] | table:t2, index:id(id) | range: decided by [eq(test.t2.id, test.t1.id)], keep order:true, stats:pseudo | -+-----------------------------+----------+-----------+------------------------+-------------------------------------------------------------------------------+ -6 rows in set (0.00 sec) -``` - ## 优化实例 使用 [bikeshare example database](https://github.com/pingcap/docs/blob/master/import-example-data.md):