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: update some UTs from cost model1 to model2 #39013

Merged
merged 8 commits into from
Nov 9, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion ddl/column_type_change_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1946,7 +1946,7 @@ func TestChangeIntToBitWillPanicInBackfillIndexes(t *testing.T) {
" KEY `idx3` (`a`,`b`),\n" +
" KEY `idx4` (`a`,`b`,`c`)\n" +
") ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin"))
tk.MustQuery("select * from t").Check(testkit.Rows("\x13 1 1.00", "\x11 2 2.00"))
tk.MustQuery("select * from t").Sort().Check(testkit.Rows("\x11 2 2.00", "\x13 1 1.00"))
}

// Close issue #24584
Expand Down
4 changes: 2 additions & 2 deletions executor/aggregate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1642,11 +1642,11 @@ func TestIssue26885(t *testing.T) {
tk.MustExec("INSERT INTO t1 (c1) VALUES ('');")
tk.MustExec("INSERT INTO t1 (c1) VALUES (0);")
tk.MustQuery("select * from t1").Check(testkit.Rows("b", "", "a", "", ""))
tk.MustQuery("select c1 + 0 from t1").Check(testkit.Rows("3", "2", "1", "2", "0"))
tk.MustQuery("select c1 + 0 from t1").Sort().Check(testkit.Rows("0", "1", "2", "2", "3"))
tk.MustQuery("SELECT c1 + 0, COUNT(c1) FROM t1 GROUP BY c1 order by c1;").Check(testkit.Rows("0 1", "1 1", "2 2", "3 1"))

tk.MustExec("alter table t1 add index idx(c1); ")
tk.MustQuery("select c1 + 0 from t1").Check(testkit.Rows("3", "2", "1", "2", "0"))
tk.MustQuery("select c1 + 0 from t1").Sort().Check(testkit.Rows("0", "1", "2", "2", "3"))
tk.MustQuery("SELECT c1 + 0, COUNT(c1) FROM t1 GROUP BY c1 order by c1;").Check(testkit.Rows("0 1", "1 1", "2 2", "3 1"))

tk.MustExec(`DROP TABLE IF EXISTS t1;`)
Expand Down
1 change: 1 addition & 0 deletions planner/core/cbo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,7 @@ func TestCorrelatedEstimation(t *testing.T) {
store := testkit.CreateMockStore(t)
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
tk.MustExec("set tidb_cost_model_version=2")
tk.MustExec("set sql_mode='STRICT_TRANS_TABLES'") // disable only full group by
tk.MustExec("create table t(a int, b int, c int, index idx(c,b,a))")
tk.MustExec("insert into t values(1,1,1), (2,2,2), (3,3,3), (4,4,4), (5,5,5), (6,6,6), (7,7,7), (8,8,8), (9,9,9),(10,10,10)")
Expand Down
22 changes: 13 additions & 9 deletions planner/core/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1321,6 +1321,7 @@ func TestReadFromStorageHintAndIsolationRead(t *testing.T) {
tk := testkit.NewTestKit(t, store)

tk.MustExec("use test")
tk.MustExec("set tidb_cost_model_version=2")
tk.MustExec("drop table if exists t, tt, ttt")
tk.MustExec("create table t(a int, b int, index ia(a))")
tk.MustExec("set @@session.tidb_isolation_read_engines=\"tikv\"")
Expand Down Expand Up @@ -5698,6 +5699,7 @@ func TestOutputSkylinePruningInfo(t *testing.T) {
store := testkit.CreateMockStore(t)
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
tk.MustExec("set tidb_cost_model_version=2")
tk.MustExec("drop table if exists t")
tk.MustExec("create table t(a int, b int, c int, d int, e int, f int, g int, primary key (a), unique key c_d_e (c, d, e), unique key f (f), unique key f_g (f, g), key g (g))")

Expand Down Expand Up @@ -5727,6 +5729,7 @@ func TestPreferRangeScanForUnsignedIntHandle(t *testing.T) {
store := testkit.CreateMockStore(t)
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
tk.MustExec("set tidb_cost_model_version=2")
tk.MustExec("drop table if exists t")
tk.MustExec("create table t(a int unsigned primary key, b int, c int, index idx_b(b))")
tk.MustExec("insert into t values (1,2,3), (4,5,6), (7,8,9), (10,11,12), (13,14,15)")
Expand Down Expand Up @@ -7089,6 +7092,7 @@ func TestAggWithJsonPushDownToTiFlash(t *testing.T) {
store := testkit.CreateMockStore(t)
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
tk.MustExec("set tidb_cost_model_version=2")
tk.MustExec("drop table if exists t")
tk.MustExec("create table t(a json);")
tk.MustExec("insert into t values(null);")
Expand All @@ -7110,26 +7114,26 @@ func TestAggWithJsonPushDownToTiFlash(t *testing.T) {
}

rows := [][]interface{}{
{"HashAgg_6", "root", "funcs:avg(Column#4)->Column#3"},
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expected, no plan change, just update Operator ID.

{"HashAgg_8", "root", "funcs:avg(Column#4)->Column#3"},
{"└─Projection_19", "root", "cast(test.t.a, double BINARY)->Column#4"},
{" └─TableReader_12", "root", "data:TableFullScan_11"},
{" └─TableFullScan_11", "cop[tiflash]", "keep order:false, stats:pseudo"},
{" └─TableReader_14", "root", "data:TableFullScan_13"},
{" └─TableFullScan_13", "cop[tiflash]", "keep order:false, stats:pseudo"},
}
tk.MustQuery("explain select avg(a) from t;").CheckAt([]int{0, 2, 4}, rows)

rows = [][]interface{}{
{"HashAgg_6", "root", "funcs:sum(Column#4)->Column#3"},
{"HashAgg_8", "root", "funcs:sum(Column#4)->Column#3"},
{"└─Projection_19", "root", "cast(test.t.a, double BINARY)->Column#4"},
{" └─TableReader_12", "root", "data:TableFullScan_11"},
{" └─TableFullScan_11", "cop[tiflash]", "keep order:false, stats:pseudo"},
{" └─TableReader_14", "root", "data:TableFullScan_13"},
{" └─TableFullScan_13", "cop[tiflash]", "keep order:false, stats:pseudo"},
}
tk.MustQuery("explain select sum(a) from t;").CheckAt([]int{0, 2, 4}, rows)

rows = [][]interface{}{
{"HashAgg_6", "root", "funcs:group_concat(Column#4 separator \",\")->Column#3"},
{"HashAgg_8", "root", "funcs:group_concat(Column#4 separator \",\")->Column#3"},
{"└─Projection_13", "root", "cast(test.t.a, var_string(4294967295))->Column#4"},
{" └─TableReader_10", "root", "data:TableFullScan_9"},
{" └─TableFullScan_9", "cop[tiflash]", "keep order:false, stats:pseudo"},
{" └─TableReader_12", "root", "data:TableFullScan_11"},
{" └─TableFullScan_11", "cop[tiflash]", "keep order:false, stats:pseudo"},
}
tk.MustQuery("explain select /*+ hash_agg() */ group_concat(a) from t;").CheckAt([]int{0, 2, 4}, rows)
}
Expand Down
2 changes: 2 additions & 0 deletions planner/core/physical_plan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,7 @@ func TestDAGPlanBuilderAgg(t *testing.T) {
store := testkit.CreateMockStore(t)
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
tk.MustExec("set tidb_cost_model_version=2")
tk.MustExec("set sql_mode='STRICT_TRANS_TABLES'") // disable only full group by
sessionVars := tk.Session().GetSessionVars()
sessionVars.SetHashAggFinalConcurrency(1)
Expand Down Expand Up @@ -1766,6 +1767,7 @@ func TestIndexJoinHint(t *testing.T) {

tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
tk.MustExec("set tidb_cost_model_version=2")
tk.MustExec(`drop table if exists test.t1, test.t2, test.t;`)
tk.MustExec(`create table test.t1(a bigint, b bigint, index idx_a(a), index idx_b(b));`)
tk.MustExec(`create table test.t2(a bigint, b bigint, index idx_a(a), index idx_b(b));`)
Expand Down
8 changes: 4 additions & 4 deletions planner/core/testdata/analyze_suite_out.json
Original file line number Diff line number Diff line change
Expand Up @@ -384,12 +384,12 @@
" │ └─TableFullScan 10.00 cop[tikv] table:t keep order:false",
" └─StreamAgg(Probe) 10.00 root funcs:count(1)->Column#21",
" └─HashJoin 10.00 root inner join, equal:[eq(test.t.a, test.t.a)]",
" ├─TableReader(Build) 10.00 root data:Selection",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expected, IndexScan is always better than TableScan.

" ├─IndexReader(Build) 10.00 root index:Selection",
" │ └─Selection 10.00 cop[tikv] eq(test.t.a, test.t.a), not(isnull(test.t.a))",
" │ └─TableFullScan 100.00 cop[tikv] table:t1 keep order:false",
" └─TableReader(Probe) 10.00 root data:Selection",
" │ └─IndexFullScan 100.00 cop[tikv] table:t1, index:idx(c, b, a) keep order:false",
" └─IndexReader(Probe) 10.00 root index:Selection",
" └─Selection 10.00 cop[tikv] eq(test.t.a, test.t.a), not(isnull(test.t.a))",
" └─TableFullScan 100.00 cop[tikv] table:s keep order:false"
" └─IndexFullScan 100.00 cop[tikv] table:s, index:idx(c, b, a) keep order:false"
],
[
"Projection 10.00 root Column#13",
Expand Down
101 changes: 50 additions & 51 deletions planner/core/testdata/integration_suite_out.json
Original file line number Diff line number Diff line change
Expand Up @@ -1964,21 +1964,20 @@
{
"SQL": "select * from t where a > 1 order by f",
"Plan": [
"IndexLookUp_14 3333.33 136747.00 root ",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expected, model2 prefers to use single-read Scan instead of double-read Lookup if not much data to access.

"├─Selection_13(Build) 3333.33 585000.00 cop[tikv] gt(test.t.a, 1)",
"│ └─IndexFullScan_11 10000.00 555000.00 cop[tikv] table:t, index:f(f) keep order:true, stats:pseudo",
"└─TableRowIDScan_12(Probe) 3333.33 370000.00 cop[tikv] table:t keep order:false, stats:pseudo"
"Sort_5 3333.33 2146348.14 root test.t.f",
"└─TableReader_9 3333.33 160128.74 root data:TableRangeScan_8",
" └─TableRangeScan_8 3333.33 923531.15 cop[tikv] table:t range:(1,+inf], keep order:false, stats:pseudo"
],
"Warnings": [
"Note 1105 [t,f,f_g] remain after pruning paths for t given Prop{SortItems: [{test.t.f asc}], TaskTp: rootTask}"
"Note 1105 [t] remain after pruning paths for t given Prop{SortItems: [], TaskTp: rootTask}"
]
},
{
"SQL": "select * from t where f > 1",
"Plan": [
"IndexLookUp_10 3333.33 86674.83 root ",
"├─IndexRangeScan_8(Build) 3333.33 185000.00 cop[tikv] table:t, index:f(f) range:(1,+inf], keep order:false, stats:pseudo",
"└─TableRowIDScan_9(Probe) 3333.33 370000.00 cop[tikv] table:t keep order:false, stats:pseudo"
"TableReader_7 3333.33 316532.90 root data:Selection_6",
"└─Selection_6 3333.33 3269593.45 cop[tikv] gt(test.t.f, 1)",
" └─TableFullScan_5 10000.00 2770593.45 cop[tikv] table:t keep order:false, stats:pseudo"
],
"Warnings": [
"Note 1105 [t,f,f_g] remain after pruning paths for t given Prop{SortItems: [], TaskTp: rootTask}"
Expand All @@ -1987,8 +1986,8 @@
{
"SQL": "select f from t where f > 1",
"Plan": [
"IndexReader_6 3333.33 11140.22 root index:IndexRangeScan_5",
"└─IndexRangeScan_5 3333.33 140000.00 cop[tikv] table:t, index:f(f) range:(1,+inf], keep order:false, stats:pseudo"
"IndexReader_6 3333.33 50257.78 root index:IndexRangeScan_5",
"└─IndexRangeScan_5 3333.33 542666.67 cop[tikv] table:t, index:f(f) range:(1,+inf], keep order:false, stats:pseudo"
],
"Warnings": [
"Note 1105 [f,f_g] remain after pruning paths for t given Prop{SortItems: [], TaskTp: rootTask}"
Expand All @@ -1997,10 +1996,10 @@
{
"SQL": "select * from t where f > 3 and g = 5",
"Plan": [
"IndexLookUp_15 3.33 206.74 root ",
"├─IndexRangeScan_12(Build) 10.00 570.00 cop[tikv] table:t, index:g(g) range:[5,5], keep order:false, stats:pseudo",
"└─Selection_14(Probe) 3.33 1140.00 cop[tikv] gt(test.t.f, 3)",
" └─TableRowIDScan_13 10.00 1110.00 cop[tikv] table:t keep order:false, stats:pseudo"
"IndexLookUp_15 3.33 19551.99 root ",
"├─IndexRangeScan_12(Build) 10.00 2035.00 cop[tikv] table:t, index:g(g) range:[5,5], keep order:false, stats:pseudo",
"└─Selection_14(Probe) 3.33 3269.59 cop[tikv] gt(test.t.f, 3)",
" └─TableRowIDScan_13 10.00 2770.59 cop[tikv] table:t keep order:false, stats:pseudo"
],
"Warnings": [
"Note 1105 [t,f_g,g] remain after pruning paths for t given Prop{SortItems: [], TaskTp: rootTask}"
Expand All @@ -2009,10 +2008,10 @@
{
"SQL": "select * from t where g = 5 order by f",
"Plan": [
"Sort_5 10.00 353.68 root test.t.f",
"└─IndexLookUp_13 10.00 230.01 root ",
" ├─IndexRangeScan_11(Build) 10.00 570.00 cop[tikv] table:t, index:g(g) range:[5,5], keep order:false, stats:pseudo",
" └─TableRowIDScan_12(Probe) 10.00 1110.00 cop[tikv] table:t keep order:false, stats:pseudo"
"Sort_5 10.00 21321.97 root test.t.f",
"└─IndexLookUp_13 10.00 19545.34 root ",
" ├─IndexRangeScan_11(Build) 10.00 2035.00 cop[tikv] table:t, index:g(g) range:[5,5], keep order:false, stats:pseudo",
" └─TableRowIDScan_12(Probe) 10.00 2770.59 cop[tikv] table:t keep order:false, stats:pseudo"
],
"Warnings": [
"Note 1105 [t,g] remain after pruning paths for t given Prop{SortItems: [], TaskTp: rootTask}"
Expand All @@ -2021,10 +2020,10 @@
{
"SQL": "select * from t where d = 3 order by c, e",
"Plan": [
"IndexLookUp_15 10.00 57222.78 root ",
"├─Selection_14(Build) 10.00 855000.00 cop[tikv] eq(test.t.d, 3)",
"│ └─IndexFullScan_12 10000.00 825000.00 cop[tikv] table:t, index:c_d_e(c, d, e) keep order:true, stats:pseudo",
"└─TableRowIDScan_13(Probe) 10.00 1110.00 cop[tikv] table:t keep order:false, stats:pseudo"
"IndexLookUp_15 10.00 215519.24 root ",
"├─Selection_14(Build) 10.00 2941000.00 cop[tikv] eq(test.t.d, 3)",
"│ └─IndexFullScan_12 10000.00 2442000.00 cop[tikv] table:t, index:c_d_e(c, d, e) keep order:true, stats:pseudo",
"└─TableRowIDScan_13(Probe) 10.00 2770.59 cop[tikv] table:t keep order:false, stats:pseudo"
],
"Warnings": [
"Note 1105 [t,c_d_e] remain after pruning paths for t given Prop{SortItems: [{test.t.c asc} {test.t.e asc}], TaskTp: rootTask}"
Expand All @@ -2043,31 +2042,31 @@
{
"SQL": "explain format = 'verbose' select * from t where b > 5",
"Plan": [
"TableReader_7 3.00 19.21 root data:Selection_6",
"└─Selection_6 3.00 195.00 cop[tikv] gt(test.t.b, 5)",
" └─TableFullScan_5 5.00 180.00 cop[tikv] table:t keep order:false"
"TableReader_7 3.00 130.42 root data:Selection_6",
"└─Selection_6 3.00 1386.04 cop[tikv] gt(test.t.b, 5)",
" └─TableFullScan_5 5.00 1136.54 cop[tikv] table:t keep order:false"
],
"Warnings": null
},
{
"SQL": "explain format = 'verbose' select * from t where b = 6 order by a limit 1",
"Plan": [
"Limit_11 0.00 14.33 root offset:0, count:1",
"└─TableReader_24 0.00 14.33 root data:Limit_23",
" └─Limit_23 0.00 195.00 cop[tikv] offset:0, count:1",
" └─Selection_22 0.00 195.00 cop[tikv] eq(test.t.b, 6)",
" └─TableFullScan_21 5.00 180.00 cop[tikv] table:t keep order:true"
"Limit_11 0.00 92.40 root offset:0, count:1",
"└─TableReader_24 0.00 92.40 root data:Limit_23",
" └─Limit_23 0.00 1386.04 cop[tikv] offset:0, count:1",
" └─Selection_22 0.00 1386.04 cop[tikv] eq(test.t.b, 6)",
" └─TableFullScan_21 5.00 1136.54 cop[tikv] table:t keep order:true"
],
"Warnings": null
},
{
"SQL": "explain format = 'verbose' select * from t where b = 6 limit 1",
"Plan": [
"Limit_8 0.00 14.33 root offset:0, count:1",
"└─TableReader_13 0.00 14.33 root data:Limit_12",
" └─Limit_12 0.00 195.00 cop[tikv] offset:0, count:1",
" └─Selection_11 0.00 195.00 cop[tikv] eq(test.t.b, 6)",
" └─TableFullScan_10 5.00 180.00 cop[tikv] table:t keep order:false"
"Limit_8 0.00 92.40 root offset:0, count:1",
"└─TableReader_13 0.00 92.40 root data:Limit_12",
" └─Limit_12 0.00 1386.04 cop[tikv] offset:0, count:1",
" └─Selection_11 0.00 1386.04 cop[tikv] eq(test.t.b, 6)",
" └─TableFullScan_10 5.00 1136.54 cop[tikv] table:t keep order:false"
],
"Warnings": null
},
Expand All @@ -2079,9 +2078,9 @@
{
"SQL": "explain format = 'verbose' select * from t where b > 5",
"Plan": [
"IndexLookUp_7 3.00 57.91 root ",
"├─IndexRangeScan_5(Build) 3.00 171.00 cop[tikv] table:t, index:idx_b(b) range:(5,+inf], keep order:false",
"└─TableRowIDScan_6(Probe) 3.00 108.00 cop[tikv] table:t keep order:false"
"IndexLookUp_7 3.00 5856.46 root ",
"├─IndexRangeScan_5(Build) 3.00 610.50 cop[tikv] table:t, index:idx_b(b) range:(5,+inf], keep order:false",
"└─TableRowIDScan_6(Probe) 3.00 681.92 cop[tikv] table:t keep order:false"
],
"Warnings": [
"Note 1105 [idx_b] remain after pruning paths for t given Prop{SortItems: [], TaskTp: rootTask}"
Expand All @@ -2090,9 +2089,9 @@
{
"SQL": "explain format = 'verbose' select * from t where b = 6 order by a limit 1",
"Plan": [
"TopN_9 0.00 19.34 root test.t.a, offset:0, count:1",
"└─IndexLookUp_16 0.00 19.33 root ",
" ├─TopN_15(Build) 0.00 0.00 cop[tikv] test.t.a, offset:0, count:1",
"TopN_9 0.00 1925.01 root test.t.a, offset:0, count:1",
"└─IndexLookUp_16 0.00 1920.21 root ",
" ├─TopN_15(Build) 0.00 3.20 cop[tikv] test.t.a, offset:0, count:1",
" │ └─IndexRangeScan_13 0.00 0.00 cop[tikv] table:t, index:idx_b(b) range:[6,6], keep order:false",
" └─TableRowIDScan_14(Probe) 0.00 0.00 cop[tikv] table:t keep order:false"
],
Expand All @@ -2103,7 +2102,7 @@
{
"SQL": "explain format = 'verbose' select * from t where b = 6 limit 1",
"Plan": [
"IndexLookUp_13 0.00 19.33 root limit embedded(offset:0, count:1)",
"IndexLookUp_13 0.00 1152.00 root limit embedded(offset:0, count:1)",
"├─Limit_12(Build) 0.00 0.00 cop[tikv] offset:0, count:1",
"│ └─IndexRangeScan_10 0.00 0.00 cop[tikv] table:t, index:idx_b(b) range:[6,6], keep order:false",
"└─TableRowIDScan_11(Probe) 0.00 0.00 cop[tikv] table:t keep order:false"
Expand Down Expand Up @@ -4314,9 +4313,9 @@
{
"SQL": "desc format = 'brief' select /*+ read_from_storage(tikv[t], tiflash[t]) */ avg(a) from t",
"Plan": [
"StreamAgg 1.00 root funcs:avg(Column#7, Column#8)->Column#4",
"└─IndexReader 1.00 root index:StreamAgg",
" └─StreamAgg 1.00 cop[tikv] funcs:count(test.t.a)->Column#7, funcs:sum(test.t.a)->Column#8",
"HashAgg 1.00 root funcs:avg(Column#5, Column#6)->Column#4",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expected, HashAgg is better since there are lots of rows(10000) to process.

"└─IndexReader 1.00 root index:HashAgg",
" └─HashAgg 1.00 cop[tikv] funcs:count(test.t.a)->Column#5, funcs:sum(test.t.a)->Column#6",
" └─IndexFullScan 10000.00 cop[tikv] table:t, index:ia(a) keep order:false, stats:pseudo"
],
"Warn": [
Expand All @@ -4326,19 +4325,19 @@
{
"SQL": "desc format = 'brief' select /*+ read_from_storage(tikv[t]) */ avg(a) from t",
"Plan": [
"StreamAgg 1.00 root funcs:avg(Column#7, Column#8)->Column#4",
"└─IndexReader 1.00 root index:StreamAgg",
" └─StreamAgg 1.00 cop[tikv] funcs:count(test.t.a)->Column#7, funcs:sum(test.t.a)->Column#8",
"HashAgg 1.00 root funcs:avg(Column#5, Column#6)->Column#4",
"└─IndexReader 1.00 root index:HashAgg",
" └─HashAgg 1.00 cop[tikv] funcs:count(test.t.a)->Column#5, funcs:sum(test.t.a)->Column#6",
" └─IndexFullScan 10000.00 cop[tikv] table:t, index:ia(a) keep order:false, stats:pseudo"
],
"Warn": null
},
{
"SQL": "desc format = 'brief' select /*+ read_from_storage(tiflash[t]) */ avg(a) from t",
"Plan": [
"StreamAgg 1.00 root funcs:avg(Column#7, Column#8)->Column#4",
"└─IndexReader 1.00 root index:StreamAgg",
" └─StreamAgg 1.00 cop[tikv] funcs:count(test.t.a)->Column#7, funcs:sum(test.t.a)->Column#8",
"HashAgg 1.00 root funcs:avg(Column#5, Column#6)->Column#4",
"└─IndexReader 1.00 root index:HashAgg",
" └─HashAgg 1.00 cop[tikv] funcs:count(test.t.a)->Column#5, funcs:sum(test.t.a)->Column#6",
" └─IndexFullScan 10000.00 cop[tikv] table:t, index:ia(a) keep order:false, stats:pseudo"
],
"Warn": [
Expand Down
Loading