|
922 | 922 | }
|
923 | 923 | ]
|
924 | 924 | },
|
925 |
| - |
926 | 925 | {
|
927 | 926 | "Name": "TestNoIndexJoinHint",
|
928 | 927 | "Cases": [
|
|
7970 | 7969 | {
|
7971 | 7970 | "SQL": "select /*+ leading(t2, t3@sel_2) */ * from t1 join t2 on t1.a=t2.a where t1.a in (select t3.a from t3)",
|
7972 | 7971 | "Plan": [
|
7973 |
| - "IndexHashJoin 4.69 root inner join, inner:IndexLookUp, outer key:test.t1.a, inner key:test.t2.a, equal cond:eq(test.t1.a, test.t2.a)", |
7974 |
| - "├─IndexHashJoin(Build) 3.75 root inner join, inner:IndexLookUp, outer key:test.t3.a, inner key:test.t1.a, equal cond:eq(test.t3.a, test.t1.a)", |
7975 |
| - "│ ├─StreamAgg(Build) 3.00 root group by:test.t3.a, funcs:firstrow(test.t3.a)->test.t3.a", |
7976 |
| - "│ │ └─IndexReader 3.00 root index:StreamAgg", |
7977 |
| - "│ │ └─StreamAgg 3.00 cop[tikv] group by:test.t3.a, ", |
7978 |
| - "│ │ └─IndexFullScan 3.00 cop[tikv] table:t3, index:a(a) keep order:true", |
7979 |
| - "│ └─IndexLookUp(Probe) 3.75 root ", |
7980 |
| - "│ ├─Selection(Build) 3.75 cop[tikv] not(isnull(test.t1.a))", |
7981 |
| - "│ │ └─IndexRangeScan 3.75 cop[tikv] table:t1, index:a(a) range: decided by [eq(test.t1.a, test.t3.a)], keep order:false, stats:pseudo", |
7982 |
| - "│ └─TableRowIDScan(Probe) 3.75 cop[tikv] table:t1 keep order:false, stats:pseudo", |
7983 |
| - "└─IndexLookUp(Probe) 4.69 root ", |
7984 |
| - " ├─Selection(Build) 4.69 cop[tikv] not(isnull(test.t2.a))", |
7985 |
| - " │ └─IndexRangeScan 4.69 cop[tikv] table:t2, index:a(a) range: decided by [eq(test.t2.a, test.t1.a)], keep order:false, stats:pseudo", |
7986 |
| - " └─TableRowIDScan(Probe) 4.69 cop[tikv] table:t2 keep order:false, stats:pseudo" |
| 7972 | + "Projection 37462.50 root test.t1.a, test.t1.b, test.t2.a, test.t2.b", |
| 7973 | + "└─HashJoin 37462.50 root inner join, equal:[eq(test.t2.a, test.t1.a) eq(test.t3.a, test.t1.a)]", |
| 7974 | + " ├─TableReader(Build) 9990.00 root data:Selection", |
| 7975 | + " │ └─Selection 9990.00 cop[tikv] not(isnull(test.t1.a))", |
| 7976 | + " │ └─TableFullScan 10000.00 cop[tikv] table:t1 keep order:false, stats:pseudo", |
| 7977 | + " └─HashJoin(Probe) 29970.00 root CARTESIAN inner join", |
| 7978 | + " ├─StreamAgg(Build) 3.00 root group by:test.t3.a, funcs:firstrow(test.t3.a)->test.t3.a", |
| 7979 | + " │ └─IndexReader 3.00 root index:StreamAgg", |
| 7980 | + " │ └─StreamAgg 3.00 cop[tikv] group by:test.t3.a, ", |
| 7981 | + " │ └─IndexFullScan 3.00 cop[tikv] table:t3, index:a(a) keep order:true", |
| 7982 | + " └─TableReader(Probe) 9990.00 root data:Selection", |
| 7983 | + " └─Selection 9990.00 cop[tikv] not(isnull(test.t2.a))", |
| 7984 | + " └─TableFullScan 10000.00 cop[tikv] table:t2 keep order:false, stats:pseudo" |
7987 | 7985 | ],
|
7988 |
| - "Warning": [ |
7989 |
| - "Warning 1815 We can only use one leading hint at most, when multiple leading hints are used, all leading hints will be invalid" |
7990 |
| - ] |
| 7986 | + "Warning": null |
7991 | 7987 | },
|
7992 | 7988 | {
|
7993 | 7989 | "SQL": "select /*+ leading(t1, t3@sel_2) */ * from t1 join t2 on t1.a=t2.a where t1.a in (select t3.a from t3)",
|
|
8007 | 8003 | " │ └─IndexRangeScan 4.69 cop[tikv] table:t2, index:a(a) range: decided by [eq(test.t2.a, test.t1.a)], keep order:false, stats:pseudo",
|
8008 | 8004 | " └─TableRowIDScan(Probe) 4.69 cop[tikv] table:t2 keep order:false, stats:pseudo"
|
8009 | 8005 | ],
|
8010 |
| - "Warning": [ |
8011 |
| - "Warning 1815 We can only use one leading hint at most, when multiple leading hints are used, all leading hints will be invalid" |
8012 |
| - ] |
| 8006 | + "Warning": null |
8013 | 8007 | },
|
8014 | 8008 | {
|
8015 | 8009 | "SQL": "select /*+ leading(t3@sel_2, t2) */ * from t1 join t2 on t1.a=t2.a where t1.a in (select t3.a from t3)",
|
8016 | 8010 | "Plan": [
|
8017 |
| - "IndexHashJoin 4.69 root inner join, inner:IndexLookUp, outer key:test.t1.a, inner key:test.t2.a, equal cond:eq(test.t1.a, test.t2.a)", |
8018 |
| - "├─IndexHashJoin(Build) 3.75 root inner join, inner:IndexLookUp, outer key:test.t3.a, inner key:test.t1.a, equal cond:eq(test.t3.a, test.t1.a)", |
8019 |
| - "│ ├─StreamAgg(Build) 3.00 root group by:test.t3.a, funcs:firstrow(test.t3.a)->test.t3.a", |
8020 |
| - "│ │ └─IndexReader 3.00 root index:StreamAgg", |
8021 |
| - "│ │ └─StreamAgg 3.00 cop[tikv] group by:test.t3.a, ", |
8022 |
| - "│ │ └─IndexFullScan 3.00 cop[tikv] table:t3, index:a(a) keep order:true", |
8023 |
| - "│ └─IndexLookUp(Probe) 3.75 root ", |
8024 |
| - "│ ├─Selection(Build) 3.75 cop[tikv] not(isnull(test.t1.a))", |
8025 |
| - "│ │ └─IndexRangeScan 3.75 cop[tikv] table:t1, index:a(a) range: decided by [eq(test.t1.a, test.t3.a)], keep order:false, stats:pseudo", |
8026 |
| - "│ └─TableRowIDScan(Probe) 3.75 cop[tikv] table:t1 keep order:false, stats:pseudo", |
8027 |
| - "└─IndexLookUp(Probe) 4.69 root ", |
8028 |
| - " ├─Selection(Build) 4.69 cop[tikv] not(isnull(test.t2.a))", |
8029 |
| - " │ └─IndexRangeScan 4.69 cop[tikv] table:t2, index:a(a) range: decided by [eq(test.t2.a, test.t1.a)], keep order:false, stats:pseudo", |
8030 |
| - " └─TableRowIDScan(Probe) 4.69 cop[tikv] table:t2 keep order:false, stats:pseudo" |
| 8011 | + "Projection 37462.50 root test.t1.a, test.t1.b, test.t2.a, test.t2.b", |
| 8012 | + "└─HashJoin 37462.50 root inner join, equal:[eq(test.t2.a, test.t1.a) eq(test.t3.a, test.t1.a)]", |
| 8013 | + " ├─TableReader(Build) 9990.00 root data:Selection", |
| 8014 | + " │ └─Selection 9990.00 cop[tikv] not(isnull(test.t1.a))", |
| 8015 | + " │ └─TableFullScan 10000.00 cop[tikv] table:t1 keep order:false, stats:pseudo", |
| 8016 | + " └─HashJoin(Probe) 29970.00 root CARTESIAN inner join", |
| 8017 | + " ├─StreamAgg(Build) 3.00 root group by:test.t3.a, funcs:firstrow(test.t3.a)->test.t3.a", |
| 8018 | + " │ └─IndexReader 3.00 root index:StreamAgg", |
| 8019 | + " │ └─StreamAgg 3.00 cop[tikv] group by:test.t3.a, ", |
| 8020 | + " │ └─IndexFullScan 3.00 cop[tikv] table:t3, index:a(a) keep order:true", |
| 8021 | + " └─TableReader(Probe) 9990.00 root data:Selection", |
| 8022 | + " └─Selection 9990.00 cop[tikv] not(isnull(test.t2.a))", |
| 8023 | + " └─TableFullScan 10000.00 cop[tikv] table:t2 keep order:false, stats:pseudo" |
8031 | 8024 | ],
|
8032 |
| - "Warning": [ |
8033 |
| - "Warning 1815 We can only use one leading hint at most, when multiple leading hints are used, all leading hints will be invalid" |
8034 |
| - ] |
| 8025 | + "Warning": null |
8035 | 8026 | },
|
8036 | 8027 | {
|
8037 | 8028 | "SQL": "select /*+ leading(t3@sel_2, t1) */ * from t1 join t2 on t1.a=t2.a where t1.a in (select t3.a from t3)",
|
|
8051 | 8042 | " │ └─IndexRangeScan 4.69 cop[tikv] table:t2, index:a(a) range: decided by [eq(test.t2.a, test.t1.a)], keep order:false, stats:pseudo",
|
8052 | 8043 | " └─TableRowIDScan(Probe) 4.69 cop[tikv] table:t2 keep order:false, stats:pseudo"
|
8053 | 8044 | ],
|
8054 |
| - "Warning": [ |
8055 |
| - "Warning 1815 We can only use one leading hint at most, when multiple leading hints are used, all leading hints will be invalid" |
8056 |
| - ] |
| 8045 | + "Warning": null |
8057 | 8046 | },
|
8058 | 8047 | {
|
8059 | 8048 | "SQL": "select /*+ leading(t4) */ * from t1 join t2 on t1.a=t2.a join t4 on t1.b = t4.b where t1.a not in (select t3.a from t3)",
|
@@ -10036,22 +10025,21 @@
|
10036 | 10025 | {
|
10037 | 10026 | "SQL": "select /*+ leading(t2, t3@sel_2) */ * from t1 join t2 on t1.a=t2.a where t1.a in (select t3.a from t3)",
|
10038 | 10027 | "Plan": [
|
10039 |
| - "HashJoin 12487.50 root inner join, equal:[eq(test.t1.a, test.t3.a)]", |
10040 |
| - "├─StreamAgg(Build) 7992.00 root group by:test.t3.a, funcs:firstrow(test.t3.a)->test.t3.a", |
10041 |
| - "│ └─IndexReader 7992.00 root index:StreamAgg", |
10042 |
| - "│ └─StreamAgg 7992.00 cop[tikv] group by:test.t3.a, ", |
10043 |
| - "│ └─IndexFullScan 9990.00 cop[tikv] table:t3, index:a(a) keep order:true, stats:pseudo", |
10044 |
| - "└─HashJoin(Probe) 12487.50 root inner join, equal:[eq(test.t1.a, test.t2.a)]", |
| 10028 | + "Projection 99800100.00 root test.t1.a, test.t1.b, test.t2.a, test.t2.b", |
| 10029 | + "└─HashJoin 99800100.00 root inner join, equal:[eq(test.t2.a, test.t1.a) eq(test.t3.a, test.t1.a)]", |
10045 | 10030 | " ├─TableReader(Build) 9990.00 root data:Selection",
|
10046 |
| - " │ └─Selection 9990.00 cop[tikv] not(isnull(test.t2.a))", |
10047 |
| - " │ └─TableFullScan 10000.00 cop[tikv] table:t2 keep order:false, stats:pseudo", |
10048 |
| - " └─TableReader(Probe) 9990.00 root data:Selection", |
10049 |
| - " └─Selection 9990.00 cop[tikv] not(isnull(test.t1.a))", |
10050 |
| - " └─TableFullScan 10000.00 cop[tikv] table:t1 keep order:false, stats:pseudo" |
| 10031 | + " │ └─Selection 9990.00 cop[tikv] not(isnull(test.t1.a))", |
| 10032 | + " │ └─TableFullScan 10000.00 cop[tikv] table:t1 keep order:false, stats:pseudo", |
| 10033 | + " └─HashJoin(Probe) 79840080.00 root CARTESIAN inner join", |
| 10034 | + " ├─StreamAgg(Build) 7992.00 root group by:test.t3.a, funcs:firstrow(test.t3.a)->test.t3.a", |
| 10035 | + " │ └─IndexReader 7992.00 root index:StreamAgg", |
| 10036 | + " │ └─StreamAgg 7992.00 cop[tikv] group by:test.t3.a, ", |
| 10037 | + " │ └─IndexFullScan 9990.00 cop[tikv] table:t3, index:a(a) keep order:true, stats:pseudo", |
| 10038 | + " └─TableReader(Probe) 9990.00 root data:Selection", |
| 10039 | + " └─Selection 9990.00 cop[tikv] not(isnull(test.t2.a))", |
| 10040 | + " └─TableFullScan 10000.00 cop[tikv] table:t2 keep order:false, stats:pseudo" |
10051 | 10041 | ],
|
10052 |
| - "Warning": [ |
10053 |
| - "Warning 1815 We can only use one leading hint at most, when multiple leading hints are used, all leading hints will be invalid" |
10054 |
| - ] |
| 10042 | + "Warning": null |
10055 | 10043 | },
|
10056 | 10044 | {
|
10057 | 10045 | "SQL": "select /*+ leading(t4) */ * from t1 left join t2 on t1.a=t2.a right join t4 on t1.b = t4.b where t1.a not in (select t3.a from t3)",
|
|
0 commit comments