Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

planner: disable index merge join temporarily #20599

Merged
merged 5 commits into from
Oct 27, 2020
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 40 additions & 40 deletions cmd/explaintest/r/explain_complex.result
Original file line number Diff line number Diff line change
Expand Up @@ -118,28 +118,28 @@ id estRows task access object operator info
Projection_13 1.00 root test.st.id, test.dd.id, test.st.aid, test.st.cm, test.dd.dic, test.dd.ip, test.dd.t, test.st.p1, test.st.p2, test.st.p3, test.st.p4, test.st.p5, test.st.p6_md5, test.st.p7_md5, test.st.ext, test.st.t
└─Limit_16 1.00 root offset:0, count:2500
└─HashAgg_19 1.00 root group by:test.dd.dic, test.st.aid, funcs:firstrow(test.st.id)->test.st.id, funcs:firstrow(test.st.aid)->test.st.aid, funcs:firstrow(test.st.cm)->test.st.cm, funcs:firstrow(test.st.p1)->test.st.p1, funcs:firstrow(test.st.p2)->test.st.p2, funcs:firstrow(test.st.p3)->test.st.p3, funcs:firstrow(test.st.p4)->test.st.p4, funcs:firstrow(test.st.p5)->test.st.p5, funcs:firstrow(test.st.p6_md5)->test.st.p6_md5, funcs:firstrow(test.st.p7_md5)->test.st.p7_md5, funcs:firstrow(test.st.ext)->test.st.ext, funcs:firstrow(test.st.t)->test.st.t, funcs:firstrow(test.dd.id)->test.dd.id, funcs:firstrow(test.dd.dic)->test.dd.dic, funcs:firstrow(test.dd.ip)->test.dd.ip, funcs:firstrow(test.dd.t)->test.dd.t
└─HashJoin_34 0.00 root inner join, equal:[eq(test.dd.aid, test.st.aid) eq(test.dd.ip, test.st.ip)], other cond:gt(test.dd.t, test.st.t)
├─IndexLookUp_52(Build) 0.00 root
│ ├─IndexRangeScan_49(Build) 3333.33 cop[tikv] table:dd, index:t(t) range:(1478143908,+inf], keep order:false, stats:pseudo
│ └─Selection_51(Probe) 0.00 cop[tikv] eq(test.dd.bm, 0), eq(test.dd.pt, "android"), not(isnull(test.dd.ip))
│ └─TableRowIDScan_50 3333.33 cop[tikv] table:dd keep order:false, stats:pseudo
└─IndexLookUp_41(Probe) 3.33 root
├─IndexRangeScan_38(Build) 3333.33 cop[tikv] table:gad, index:t(t) range:(1478143908,+inf], keep order:false, stats:pseudo
└─Selection_40(Probe) 3.33 cop[tikv] eq(test.st.pt, "android"), not(isnull(test.st.ip))
└─TableRowIDScan_39 3333.33 cop[tikv] table:gad keep order:false, stats:pseudo
└─HashJoin_28 0.00 root inner join, equal:[eq(test.dd.aid, test.st.aid) eq(test.dd.ip, test.st.ip)], other cond:gt(test.dd.t, test.st.t)
├─IndexLookUp_46(Build) 0.00 root
│ ├─IndexRangeScan_43(Build) 3333.33 cop[tikv] table:dd, index:t(t) range:(1478143908,+inf], keep order:false, stats:pseudo
│ └─Selection_45(Probe) 0.00 cop[tikv] eq(test.dd.bm, 0), eq(test.dd.pt, "android"), not(isnull(test.dd.ip))
│ └─TableRowIDScan_44 3333.33 cop[tikv] table:dd keep order:false, stats:pseudo
└─IndexLookUp_35(Probe) 3.33 root
├─IndexRangeScan_32(Build) 3333.33 cop[tikv] table:gad, index:t(t) range:(1478143908,+inf], keep order:false, stats:pseudo
└─Selection_34(Probe) 3.33 cop[tikv] eq(test.st.pt, "android"), not(isnull(test.st.ip))
└─TableRowIDScan_33 3333.33 cop[tikv] table:gad keep order:false, stats:pseudo
explain select gad.id as gid,sdk.id as sid,gad.aid as aid,gad.cm as cm,sdk.dic as dic,sdk.ip as ip, sdk.t as t, gad.p1 as p1, gad.p2 as p2, gad.p3 as p3, gad.p4 as p4, gad.p5 as p5, gad.p6_md5 as p6, gad.p7_md5 as p7, gad.ext as ext from st gad join dd sdk on gad.aid = sdk.aid and gad.dic = sdk.mac and gad.t < sdk.t where gad.t > 1477971479 and gad.bm = 0 and gad.pt = 'ios' and gad.dit = 'mac' and sdk.t > 1477971479 and sdk.bm = 0 and sdk.pt = 'ios' limit 3000;
id estRows task access object operator info
Projection_10 0.00 root test.st.id, test.dd.id, test.st.aid, test.st.cm, test.dd.dic, test.dd.ip, test.dd.t, test.st.p1, test.st.p2, test.st.p3, test.st.p4, test.st.p5, test.st.p6_md5, test.st.p7_md5, test.st.ext
└─Limit_13 0.00 root offset:0, count:3000
└─IndexMergeJoin_24 0.00 root inner join, inner:IndexLookUp_22, outer key:test.st.aid, inner key:test.dd.aid, other cond:eq(test.st.dic, test.dd.mac), lt(test.st.t, test.dd.t)
├─IndexLookUp_35(Build) 0.00 root
│ ├─IndexRangeScan_32(Build) 3333.33 cop[tikv] table:gad, index:t(t) range:(1477971479,+inf], keep order:false, stats:pseudo
│ └─Selection_34(Probe) 0.00 cop[tikv] eq(test.st.bm, 0), eq(test.st.dit, "mac"), eq(test.st.pt, "ios"), not(isnull(test.st.dic))
│ └─TableRowIDScan_33 3333.33 cop[tikv] table:gad keep order:false, stats:pseudo
└─IndexLookUp_22(Probe) 0.00 root
├─IndexRangeScan_19(Build) 10000.00 cop[tikv] table:sdk, index:aid(aid, dic) range: decided by [eq(test.dd.aid, test.st.aid)], keep order:true, stats:pseudo
└─Selection_21(Probe) 0.00 cop[tikv] eq(test.dd.bm, 0), eq(test.dd.pt, "ios"), gt(test.dd.t, 1477971479), not(isnull(test.dd.mac)), not(isnull(test.dd.t))
└─TableRowIDScan_20 10000.00 cop[tikv] table:sdk keep order:false, stats:pseudo
└─IndexJoin_18 0.00 root inner join, inner:IndexLookUp_17, outer key:test.st.aid, inner key:test.dd.aid, other cond:eq(test.st.dic, test.dd.mac), lt(test.st.t, test.dd.t)
├─IndexLookUp_29(Build) 0.00 root
│ ├─IndexRangeScan_26(Build) 3333.33 cop[tikv] table:gad, index:t(t) range:(1477971479,+inf], keep order:false, stats:pseudo
│ └─Selection_28(Probe) 0.00 cop[tikv] eq(test.st.bm, 0), eq(test.st.dit, "mac"), eq(test.st.pt, "ios"), not(isnull(test.st.dic))
│ └─TableRowIDScan_27 3333.33 cop[tikv] table:gad keep order:false, stats:pseudo
└─IndexLookUp_17(Probe) 0.00 root
├─IndexRangeScan_14(Build) 10000.00 cop[tikv] table:sdk, index:aid(aid, dic) range: decided by [eq(test.dd.aid, test.st.aid)], keep order:false, stats:pseudo
└─Selection_16(Probe) 0.00 cop[tikv] eq(test.dd.bm, 0), eq(test.dd.pt, "ios"), gt(test.dd.t, 1477971479), not(isnull(test.dd.mac)), not(isnull(test.dd.t))
└─TableRowIDScan_15 10000.00 cop[tikv] table:sdk keep order:false, stats:pseudo
explain SELECT cm, p1, p2, p3, p4, p5, p6_md5, p7_md5, count(1) as click_pv, count(DISTINCT ip) as click_ip FROM st WHERE (t between 1478188800 and 1478275200) and aid='cn.sbkcq' and pt='android' GROUP BY cm, p1, p2, p3, p4, p5, p6_md5, p7_md5;
id estRows task access object operator info
Projection_5 1.00 root test.st.cm, test.st.p1, test.st.p2, test.st.p3, test.st.p4, test.st.p5, test.st.p6_md5, test.st.p7_md5, Column#20, Column#21
Expand All @@ -152,15 +152,15 @@ explain select dt.id as id, dt.aid as aid, dt.pt as pt, dt.dic as dic, dt.cm as
id estRows task access object operator info
Projection_10 0.00 root test.dt.id, test.dt.aid, test.dt.pt, test.dt.dic, test.dt.cm, test.rr.gid, test.rr.acd, test.rr.t, test.dt.p1, test.dt.p2, test.dt.p3, test.dt.p4, test.dt.p5, test.dt.p6_md5, test.dt.p7_md5
└─Limit_13 0.00 root offset:0, count:2000
└─IndexMergeJoin_41 0.00 root inner join, inner:IndexLookUp_39, outer key:test.rr.aid, test.rr.dic, inner key:test.dt.aid, test.dt.dic
├─TableReader_61(Build) 3.33 root data:Selection_60
│ └─Selection_60 3.33 cop[tikv] eq(test.rr.pt, "ios"), gt(test.rr.t, 1478185592)
│ └─TableFullScan_59 10000.00 cop[tikv] table:rr keep order:false, stats:pseudo
└─IndexLookUp_39(Probe) 0.00 root
├─Selection_37(Build) 1.00 cop[tikv] not(isnull(test.dt.dic))
│ └─IndexRangeScan_35 1.00 cop[tikv] table:dt, index:aid(aid, dic) range: decided by [eq(test.dt.aid, test.rr.aid) eq(test.dt.dic, test.rr.dic)], keep order:true, stats:pseudo
└─Selection_38(Probe) 0.00 cop[tikv] eq(test.dt.bm, 0), eq(test.dt.pt, "ios"), gt(test.dt.t, 1478185592)
└─TableRowIDScan_36 1.00 cop[tikv] table:dt keep order:false, stats:pseudo
└─IndexJoin_27 0.00 root inner join, inner:IndexLookUp_26, outer key:test.rr.aid, test.rr.dic, inner key:test.dt.aid, test.dt.dic
├─TableReader_47(Build) 3.33 root data:Selection_46
│ └─Selection_46 3.33 cop[tikv] eq(test.rr.pt, "ios"), gt(test.rr.t, 1478185592)
│ └─TableFullScan_45 10000.00 cop[tikv] table:rr keep order:false, stats:pseudo
└─IndexLookUp_26(Probe) 0.00 root
├─Selection_24(Build) 1.00 cop[tikv] not(isnull(test.dt.dic))
│ └─IndexRangeScan_22 1.00 cop[tikv] table:dt, index:aid(aid, dic) range: decided by [eq(test.dt.aid, test.rr.aid) eq(test.dt.dic, test.rr.dic)], keep order:false, stats:pseudo
└─Selection_25(Probe) 0.00 cop[tikv] eq(test.dt.bm, 0), eq(test.dt.pt, "ios"), gt(test.dt.t, 1478185592)
└─TableRowIDScan_23 1.00 cop[tikv] table:dt keep order:false, stats:pseudo
explain select pc,cr,count(DISTINCT uid) as pay_users,count(oid) as pay_times,sum(am) as am from pp where ps=2 and ppt>=1478188800 and ppt<1478275200 and pi in ('510017','520017') and uid in ('18089709','18090780') group by pc,cr;
id estRows task access object operator info
Projection_5 1.00 root test.pp.pc, test.pp.cr, Column#22, Column#23, Column#24
Expand Down Expand Up @@ -247,16 +247,16 @@ Sort_10 1.00 root test.org_department.left_value:asc
└─HashAgg_15 1.00 root group by:test.org_department.id, funcs:firstrow(test.org_department.id)->test.org_department.id, funcs:firstrow(test.org_department.ctx)->test.org_department.ctx, funcs:firstrow(test.org_department.name)->test.org_department.name, funcs:firstrow(test.org_department.left_value)->test.org_department.left_value, funcs:firstrow(test.org_department.right_value)->test.org_department.right_value, funcs:firstrow(test.org_department.depth)->test.org_department.depth, funcs:firstrow(test.org_department.leader_id)->test.org_department.leader_id, funcs:firstrow(test.org_department.status)->test.org_department.status, funcs:firstrow(test.org_department.created_on)->test.org_department.created_on, funcs:firstrow(test.org_department.updated_on)->test.org_department.updated_on
└─Selection_22 0.01 root or(eq(test.org_employee_position.user_id, 62), or(eq(test.org_department.id, 20), eq(test.org_department.id, 20)))
└─HashJoin_24 0.02 root left outer join, equal:[eq(test.org_position.id, test.org_employee_position.position_id)]
├─IndexMergeJoin_40(Build) 0.01 root left outer join, inner:IndexLookUp_38, outer key:test.org_department.id, inner key:test.org_position.department_id
│ ├─IndexLookUp_62(Build) 0.01 root
│ │ ├─IndexRangeScan_59(Build) 10.00 cop[tikv] table:d, index:org_department_ctx_index(ctx) range:[1,1], keep order:false, stats:pseudo
│ │ └─Selection_61(Probe) 0.01 cop[tikv] eq(test.org_department.status, 1000)
│ │ └─TableRowIDScan_60 10.00 cop[tikv] table:d keep order:false, stats:pseudo
│ └─IndexLookUp_38(Probe) 1.25 root
│ ├─Selection_36(Build) 1250.00 cop[tikv] not(isnull(test.org_position.department_id))
│ │ └─IndexRangeScan_34 1251.25 cop[tikv] table:p, index:org_position_department_id_index(department_id) range: decided by [eq(test.org_position.department_id, test.org_department.id)], keep order:true, stats:pseudo
│ └─Selection_37(Probe) 1.25 cop[tikv] eq(test.org_position.status, 1000)
│ └─TableRowIDScan_35 1250.00 cop[tikv] table:p keep order:false, stats:pseudo
└─TableReader_72(Probe) 9.99 root data:Selection_71
└─Selection_71 9.99 cop[tikv] eq(test.org_employee_position.status, 1000), not(isnull(test.org_employee_position.position_id))
└─TableFullScan_70 10000.00 cop[tikv] table:ep keep order:false, stats:pseudo
├─IndexJoin_33(Build) 0.01 root left outer join, inner:IndexLookUp_32, outer key:test.org_department.id, inner key:test.org_position.department_id
│ ├─IndexLookUp_55(Build) 0.01 root
│ │ ├─IndexRangeScan_52(Build) 10.00 cop[tikv] table:d, index:org_department_ctx_index(ctx) range:[1,1], keep order:false, stats:pseudo
│ │ └─Selection_54(Probe) 0.01 cop[tikv] eq(test.org_department.status, 1000)
│ │ └─TableRowIDScan_53 10.00 cop[tikv] table:d keep order:false, stats:pseudo
│ └─IndexLookUp_32(Probe) 1.25 root
│ ├─Selection_30(Build) 1250.00 cop[tikv] not(isnull(test.org_position.department_id))
│ │ └─IndexRangeScan_28 1251.25 cop[tikv] table:p, index:org_position_department_id_index(department_id) range: decided by [eq(test.org_position.department_id, test.org_department.id)], keep order:false, stats:pseudo
│ └─Selection_31(Probe) 1.25 cop[tikv] eq(test.org_position.status, 1000)
│ └─TableRowIDScan_29 1250.00 cop[tikv] table:p keep order:false, stats:pseudo
└─TableReader_65(Probe) 9.99 root data:Selection_64
└─Selection_64 9.99 cop[tikv] eq(test.org_employee_position.status, 1000), not(isnull(test.org_employee_position.position_id))
└─TableFullScan_63 10000.00 cop[tikv] table:ep keep order:false, stats:pseudo
Loading