Skip to content

Commit

Permalink
Merge branch 'master' into nth
Browse files Browse the repository at this point in the history
  • Loading branch information
alivxxx authored Mar 11, 2019
2 parents 8b3973c + 9891b3d commit 2139e8d
Show file tree
Hide file tree
Showing 30 changed files with 717 additions and 145 deletions.
46 changes: 23 additions & 23 deletions cmd/explaintest/r/explain_easy.result
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ TableReader_7 0.33 root data:Selection_6
explain select sum(t1.c1 in (select c1 from t2)) from t1;
id count task operator info
StreamAgg_12 1.00 root funcs:sum(col_0)
└─Projection_21 10000.00 root cast(5_aux_0)
└─Projection_19 10000.00 root cast(5_aux_0)
└─HashLeftJoin_18 10000.00 root left outer semi join, inner:TableReader_17, other cond:eq(test.t1.c1, test.t2.c1)
├─TableReader_20 10000.00 root data:TableScan_19
│ └─TableScan_19 10000.00 cop table:t1, range:[-inf,+inf], keep order:false, stats:pseudo
├─TableReader_15 10000.00 root data:TableScan_14
│ └─TableScan_14 10000.00 cop table:t1, range:[-inf,+inf], keep order:false, stats:pseudo
└─TableReader_17 10000.00 root data:TableScan_16
└─TableScan_16 10000.00 cop table:t2, range:[-inf,+inf], keep order:false, stats:pseudo
explain select c1 from t1 where c1 in (select c2 from t2);
Expand Down Expand Up @@ -196,10 +196,10 @@ set @@session.tidb_opt_insubq_to_join_and_agg=0;
explain select sum(t1.c1 in (select c1 from t2)) from t1;
id count task operator info
StreamAgg_12 1.00 root funcs:sum(col_0)
└─Projection_21 10000.00 root cast(5_aux_0)
└─Projection_19 10000.00 root cast(5_aux_0)
└─HashLeftJoin_18 10000.00 root left outer semi join, inner:TableReader_17, other cond:eq(test.t1.c1, test.t2.c1)
├─TableReader_20 10000.00 root data:TableScan_19
│ └─TableScan_19 10000.00 cop table:t1, range:[-inf,+inf], keep order:false, stats:pseudo
├─TableReader_15 10000.00 root data:TableScan_14
│ └─TableScan_14 10000.00 cop table:t1, range:[-inf,+inf], keep order:false, stats:pseudo
└─TableReader_17 10000.00 root data:TableScan_16
└─TableScan_16 10000.00 cop table:t2, range:[-inf,+inf], keep order:false, stats:pseudo
explain select 1 in (select c2 from t2) from t1;
Expand All @@ -214,10 +214,10 @@ Projection_6 10000.00 root 5_aux_0
explain select sum(6 in (select c2 from t2)) from t1;
id count task operator info
StreamAgg_12 1.00 root funcs:sum(col_0)
└─Projection_22 10000.00 root cast(5_aux_0)
└─Projection_20 10000.00 root cast(5_aux_0)
└─HashLeftJoin_19 10000.00 root left outer semi join, inner:TableReader_18
├─TableReader_21 10000.00 root data:TableScan_20
│ └─TableScan_20 10000.00 cop table:t1, range:[-inf,+inf], keep order:false, stats:pseudo
├─TableReader_15 10000.00 root data:TableScan_14
│ └─TableScan_14 10000.00 cop table:t1, range:[-inf,+inf], keep order:false, stats:pseudo
└─TableReader_18 10.00 root data:Selection_17
└─Selection_17 10.00 cop eq(6, test.t2.c2)
└─TableScan_16 10000.00 cop table:t2, range:[-inf,+inf], keep order:false, stats:pseudo
Expand All @@ -229,24 +229,24 @@ subgraph cluster12{
node [style=filled, color=lightgrey]
color=black
label = "root"
"StreamAgg_12" -> "Projection_21"
"Projection_21" -> "HashLeftJoin_18"
"HashLeftJoin_18" -> "TableReader_20"
"StreamAgg_12" -> "Projection_19"
"Projection_19" -> "HashLeftJoin_18"
"HashLeftJoin_18" -> "TableReader_15"
"HashLeftJoin_18" -> "TableReader_17"
}
subgraph cluster19{
subgraph cluster14{
node [style=filled, color=lightgrey]
color=black
label = "cop"
"TableScan_19"
"TableScan_14"
}
subgraph cluster16{
node [style=filled, color=lightgrey]
color=black
label = "cop"
"TableScan_16"
}
"TableReader_20" -> "TableScan_19"
"TableReader_15" -> "TableScan_14"
"TableReader_17" -> "TableScan_16"
}

Expand Down Expand Up @@ -289,8 +289,8 @@ Projection_11 10000.00 root 9_aux_0
│ └─TableScan_14 10000.00 cop table:t, range:[-inf,+inf], keep order:false, stats:pseudo
└─StreamAgg_20 1.00 root funcs:count(1)
└─IndexJoin_44 12.50 root inner join, inner:TableReader_43, outer key:s.a, inner key:t1.a
├─TableReader_52 1.00 root data:TableScan_51
│ └─TableScan_51 1.00 cop table:s, range: decided by [eq(s.a, test.t.a)], keep order:false, stats:pseudo
├─TableReader_37 1.00 root data:TableScan_36
│ └─TableScan_36 1.00 cop table:s, range: decided by [eq(s.a, test.t.a)], keep order:false, stats:pseudo
└─TableReader_43 10.00 root data:Selection_42
└─Selection_42 10.00 cop eq(t1.a, test.t.a)
└─TableScan_41 10.00 cop table:t1, range: decided by [s.a], keep order:false, stats:pseudo
Expand All @@ -302,8 +302,8 @@ Projection_11 10000.00 root 9_aux_0
│ └─TableScan_14 10000.00 cop table:t, range:[-inf,+inf], keep order:false, stats:pseudo
└─StreamAgg_20 1.00 root funcs:count(1)
└─IndexJoin_32 12.50 root inner join, inner:TableReader_31, outer key:s.a, inner key:t1.a
├─IndexReader_36 10.00 root index:IndexScan_35
│ └─IndexScan_35 10.00 cop table:s, index:b, range: decided by [eq(s.b, test.t.a)], keep order:false, stats:pseudo
├─IndexReader_27 10.00 root index:IndexScan_26
│ └─IndexScan_26 10.00 cop table:s, index:b, range: decided by [eq(s.b, test.t.a)], keep order:false, stats:pseudo
└─TableReader_31 10.00 root data:TableScan_30
└─TableScan_30 10.00 cop table:t1, range: decided by [s.a], keep order:false, stats:pseudo
explain select t.c in (select count(*) from t s use index(idx), t t1 where s.b = t.a and s.c = t1.a) from t;
Expand All @@ -314,10 +314,10 @@ Projection_11 10000.00 root 9_aux_0
│ └─TableScan_14 10000.00 cop table:t, range:[-inf,+inf], keep order:false, stats:pseudo
└─StreamAgg_20 1.00 root funcs:count(1)
└─IndexJoin_34 12.49 root inner join, inner:TableReader_33, outer key:s.c, inner key:t1.a
├─IndexLookUp_40 9.99 root
│ ├─IndexScan_37 10.00 cop table:s, index:b, range: decided by [eq(s.b, test.t.a)], keep order:false, stats:pseudo
│ └─Selection_39 9.99 cop not(isnull(s.c))
│ └─TableScan_38 10.00 cop table:t, keep order:false, stats:pseudo
├─IndexLookUp_29 9.99 root
│ ├─IndexScan_26 10.00 cop table:s, index:b, range: decided by [eq(s.b, test.t.a)], keep order:false, stats:pseudo
│ └─Selection_28 9.99 cop not(isnull(s.c))
│ └─TableScan_27 10.00 cop table:t, keep order:false, stats:pseudo
└─TableReader_33 10.00 root data:TableScan_32
└─TableScan_32 10.00 cop table:t1, range: decided by [s.c], keep order:false, stats:pseudo
drop table if exists t;
Expand Down
53 changes: 53 additions & 0 deletions cmd/explaintest/r/topn_push_down.result
Original file line number Diff line number Diff line change
Expand Up @@ -218,3 +218,56 @@ Apply_17 9990.00 root semi join, inner:Selection_21, equal:[eq(test.t1.a, x.a)]
└─Limit_28 1.00 cop offset:0, count:1
└─Selection_27 1.00 cop gt(test.t2.b, test.t1.b)
└─TableScan_26 1.25 cop table:t2, range:[-inf,+inf], keep order:false, stats:pseudo
drop table if exists t;
create table t(a int not null, index idx(a));
explain select /*+ TIDB_INLJ(t2) */ * from t t1 join t t2 on t1.a = t2.a limit 5;
id count task operator info
Limit_11 5.00 root offset:0, count:5
└─IndexJoin_15 5.00 root inner join, inner:IndexReader_14, outer key:t1.a, inner key:t2.a
├─TableReader_17 4.00 root data:TableScan_16
│ └─TableScan_16 4.00 cop table:t1, range:[-inf,+inf], keep order:false, stats:pseudo
└─IndexReader_14 10.00 root index:IndexScan_13
└─IndexScan_13 10.00 cop table:t2, index:a, range: decided by [t1.a], keep order:false, stats:pseudo
explain select /*+ TIDB_INLJ(t2) */ * from t t1 left join t t2 on t1.a = t2.a where t2.a is null limit 5;
id count task operator info
Limit_12 5.00 root offset:0, count:5
└─Selection_13 5.00 root isnull(t2.a)
└─IndexJoin_17 5.00 root left outer join, inner:IndexReader_16, outer key:t1.a, inner key:t2.a
├─TableReader_19 4.00 root data:TableScan_18
│ └─TableScan_18 4.00 cop table:t1, range:[-inf,+inf], keep order:false, stats:pseudo
└─IndexReader_16 10.00 root index:IndexScan_15
└─IndexScan_15 10.00 cop table:t2, index:a, range: decided by [t1.a], keep order:false, stats:pseudo
explain select /*+ TIDB_SMJ(t1, t2) */ * from t t1 join t t2 on t1.a = t2.a limit 5;
id count task operator info
Limit_11 5.00 root offset:0, count:5
└─MergeJoin_12 5.00 root inner join, left key:t1.a, right key:t2.a
├─IndexReader_14 4.00 root index:IndexScan_13
│ └─IndexScan_13 4.00 cop table:t1, index:a, range:[NULL,+inf], keep order:true, stats:pseudo
└─IndexReader_16 4.00 root index:IndexScan_15
└─IndexScan_15 4.00 cop table:t2, index:a, range:[NULL,+inf], keep order:true, stats:pseudo
explain select /*+ TIDB_SMJ(t1, t2) */ * from t t1 left join t t2 on t1.a = t2.a where t2.a is null limit 5;
id count task operator info
Limit_12 5.00 root offset:0, count:5
└─Selection_13 5.00 root isnull(t2.a)
└─MergeJoin_14 5.00 root left outer join, left key:t1.a, right key:t2.a
├─IndexReader_16 4.00 root index:IndexScan_15
│ └─IndexScan_15 4.00 cop table:t1, index:a, range:[NULL,+inf], keep order:true, stats:pseudo
└─IndexReader_18 4.00 root index:IndexScan_17
└─IndexScan_17 4.00 cop table:t2, index:a, range:[NULL,+inf], keep order:true, stats:pseudo
explain select /*+ TIDB_HJ(t1, t2) */ * from t t1 join t t2 on t1.a = t2.a limit 5;
id count task operator info
Limit_11 5.00 root offset:0, count:5
└─HashLeftJoin_19 5.00 root inner join, inner:TableReader_24, equal:[eq(t1.a, t2.a)]
├─TableReader_22 4.00 root data:TableScan_21
│ └─TableScan_21 4.00 cop table:t1, range:[-inf,+inf], keep order:false, stats:pseudo
└─TableReader_24 10000.00 root data:TableScan_23
└─TableScan_23 10000.00 cop table:t2, range:[-inf,+inf], keep order:false, stats:pseudo
explain select /*+ TIDB_HJ(t1, t2) */ * from t t1 left join t t2 on t1.a = t2.a where t2.a is null limit 5;
id count task operator info
Limit_12 5.00 root offset:0, count:5
└─Selection_13 5.00 root isnull(t2.a)
└─HashLeftJoin_18 5.00 root left outer join, inner:TableReader_22, equal:[eq(t1.a, t2.a)]
├─TableReader_20 4.00 root data:TableScan_19
│ └─TableScan_19 4.00 cop table:t1, range:[-inf,+inf], keep order:false, stats:pseudo
└─TableReader_22 10000.00 root data:TableScan_21
└─TableScan_21 10000.00 cop table:t2, range:[-inf,+inf], keep order:false, stats:pseudo
50 changes: 25 additions & 25 deletions cmd/explaintest/r/tpch.result
Original file line number Diff line number Diff line change
Expand Up @@ -712,20 +712,20 @@ and n_name = 'MOZAMBIQUE'
order by
value desc;
id count task operator info
Projection_63 1304801.67 root tpch.partsupp.ps_partkey, value
└─Sort_64 1304801.67 root value:desc
└─Selection_66 1304801.67 root gt(sel_agg_4, NULL)
└─HashAgg_69 1631002.09 root group by:col_2, funcs:sum(col_0), firstrow(col_1)
└─Projection_88 1631002.09 root mul(tpch.partsupp.ps_supplycost, cast(tpch.partsupp.ps_availqty)), tpch.partsupp.ps_partkey, tpch.partsupp.ps_partkey
└─HashRightJoin_73 1631002.09 root inner join, inner:HashRightJoin_79, equal:[eq(tpch.supplier.s_suppkey, tpch.partsupp.ps_suppkey)]
├─HashRightJoin_79 20000.00 root inner join, inner:TableReader_84, equal:[eq(tpch.nation.n_nationkey, tpch.supplier.s_nationkey)]
│ ├─TableReader_84 1.00 root data:Selection_83
│ │ └─Selection_83 1.00 cop eq(tpch.nation.n_name, "MOZAMBIQUE")
│ │ └─TableScan_82 25.00 cop table:nation, range:[-inf,+inf], keep order:false
│ └─TableReader_81 500000.00 root data:TableScan_80
│ └─TableScan_80 500000.00 cop table:supplier, range:[-inf,+inf], keep order:false
└─TableReader_86 40000000.00 root data:TableScan_85
└─TableScan_85 40000000.00 cop table:partsupp, range:[-inf,+inf], keep order:false
Projection_50 1304801.67 root tpch.partsupp.ps_partkey, value
└─Sort_51 1304801.67 root value:desc
└─Selection_53 1304801.67 root gt(sel_agg_4, NULL)
└─HashAgg_56 1631002.09 root group by:col_2, funcs:sum(col_0), firstrow(col_1)
└─Projection_75 1631002.09 root mul(tpch.partsupp.ps_supplycost, cast(tpch.partsupp.ps_availqty)), tpch.partsupp.ps_partkey, tpch.partsupp.ps_partkey
└─HashRightJoin_60 1631002.09 root inner join, inner:HashRightJoin_66, equal:[eq(tpch.supplier.s_suppkey, tpch.partsupp.ps_suppkey)]
├─HashRightJoin_66 20000.00 root inner join, inner:TableReader_71, equal:[eq(tpch.nation.n_nationkey, tpch.supplier.s_nationkey)]
│ ├─TableReader_71 1.00 root data:Selection_70
│ │ └─Selection_70 1.00 cop eq(tpch.nation.n_name, "MOZAMBIQUE")
│ │ └─TableScan_69 25.00 cop table:nation, range:[-inf,+inf], keep order:false
│ └─TableReader_68 500000.00 root data:TableScan_67
│ └─TableScan_67 500000.00 cop table:supplier, range:[-inf,+inf], keep order:false
└─TableReader_73 40000000.00 root data:TableScan_72
└─TableScan_72 40000000.00 cop table:partsupp, range:[-inf,+inf], keep order:false
/*
Q12 Shipping Modes and Order Priority Query
This query determines whether selecting less expensive modes of shipping is negatively affecting the critical-priority
Expand Down Expand Up @@ -840,11 +840,11 @@ and l_shipdate < date_add('1996-12-01', interval '1' month);
id count task operator info
Projection_8 1.00 root div(mul(100.00, 5_col_0), 5_col_1)
└─StreamAgg_13 1.00 root funcs:sum(col_0), sum(col_1)
└─Projection_34 4121984.49 root case(like(tpch.part.p_type, "PROMO%", 92), mul(tpch.lineitem.l_extendedprice, minus(1, tpch.lineitem.l_discount)), 0), mul(tpch.lineitem.l_extendedprice, minus(1, tpch.lineitem.l_discount))
└─Projection_29 4121984.49 root case(like(tpch.part.p_type, "PROMO%", 92), mul(tpch.lineitem.l_extendedprice, minus(1, tpch.lineitem.l_discount)), 0), mul(tpch.lineitem.l_extendedprice, minus(1, tpch.lineitem.l_discount))
└─IndexJoin_26 4121984.49 root inner join, inner:TableReader_25, outer key:tpch.lineitem.l_partkey, inner key:tpch.part.p_partkey
├─TableReader_31 4121984.49 root data:Selection_30
│ └─Selection_30 4121984.49 cop ge(tpch.lineitem.l_shipdate, 1996-12-01 00:00:00.000000), lt(tpch.lineitem.l_shipdate, 1997-01-01)
│ └─TableScan_29 300005811.00 cop table:lineitem, range:[-inf,+inf], keep order:false
├─TableReader_21 4121984.49 root data:Selection_20
│ └─Selection_20 4121984.49 cop ge(tpch.lineitem.l_shipdate, 1996-12-01 00:00:00.000000), lt(tpch.lineitem.l_shipdate, 1997-01-01)
│ └─TableScan_19 300005811.00 cop table:lineitem, range:[-inf,+inf], keep order:false
└─TableReader_25 1.00 root data:TableScan_24
└─TableScan_24 1.00 cop table:part, range: decided by [tpch.lineitem.l_partkey], keep order:false
/*
Expand Down Expand Up @@ -979,9 +979,9 @@ Projection_16 1.00 root div(11_col_0, 7.0)
│ │ └─TableScan_33 10000000.00 cop table:part, range:[-inf,+inf], keep order:false
│ └─TableReader_32 300005811.00 root data:TableScan_31
│ └─TableScan_31 300005811.00 cop table:lineitem, range:[-inf,+inf], keep order:false
└─HashAgg_61 9943040.00 root group by:col_3, funcs:avg(col_0, col_1), firstrow(col_2)
└─TableReader_62 9943040.00 root data:HashAgg_58
└─HashAgg_58 9943040.00 cop group by:tpch.lineitem.l_partkey, funcs:avg(tpch.lineitem.l_quantity), firstrow(tpch.lineitem.l_partkey)
└─HashAgg_40 9943040.00 root group by:col_3, funcs:avg(col_0, col_1), firstrow(col_2)
└─TableReader_41 9943040.00 root data:HashAgg_36
└─HashAgg_36 9943040.00 cop group by:tpch.lineitem.l_partkey, funcs:avg(tpch.lineitem.l_quantity), firstrow(tpch.lineitem.l_partkey)
└─TableScan_39 300005811.00 cop table:lineitem, range:[-inf,+inf], keep order:false
/*
Q18 Large Volume Customer Query
Expand Down Expand Up @@ -1091,11 +1091,11 @@ and l_shipinstruct = 'DELIVER IN PERSON'
);
id count task operator info
StreamAgg_13 1.00 root funcs:sum(col_0)
└─Projection_38 6286493.79 root mul(tpch.lineitem.l_extendedprice, minus(1, tpch.lineitem.l_discount))
└─Projection_32 6286493.79 root mul(tpch.lineitem.l_extendedprice, minus(1, tpch.lineitem.l_discount))
└─IndexJoin_29 6286493.79 root inner join, inner:TableReader_28, outer key:tpch.lineitem.l_partkey, inner key:tpch.part.p_partkey, other cond:or(and(and(eq(tpch.part.p_brand, "Brand#52"), in(tpch.part.p_container, "SM CASE", "SM BOX", "SM PACK", "SM PKG")), and(ge(tpch.lineitem.l_quantity, 4), and(le(tpch.lineitem.l_quantity, 14), le(tpch.part.p_size, 5)))), or(and(and(eq(tpch.part.p_brand, "Brand#11"), in(tpch.part.p_container, "MED BAG", "MED BOX", "MED PKG", "MED PACK")), and(ge(tpch.lineitem.l_quantity, 18), and(le(tpch.lineitem.l_quantity, 28), le(tpch.part.p_size, 10)))), and(and(eq(tpch.part.p_brand, "Brand#51"), in(tpch.part.p_container, "LG CASE", "LG BOX", "LG PACK", "LG PKG")), and(ge(tpch.lineitem.l_quantity, 29), and(le(tpch.lineitem.l_quantity, 39), le(tpch.part.p_size, 15))))))
├─TableReader_34 6286493.79 root data:Selection_33
│ └─Selection_33 6286493.79 cop eq(tpch.lineitem.l_shipinstruct, "DELIVER IN PERSON"), in(tpch.lineitem.l_shipmode, "AIR", "AIR REG"), or(and(ge(tpch.lineitem.l_quantity, 4), le(tpch.lineitem.l_quantity, 14)), or(and(ge(tpch.lineitem.l_quantity, 18), le(tpch.lineitem.l_quantity, 28)), and(ge(tpch.lineitem.l_quantity, 29), le(tpch.lineitem.l_quantity, 39))))
│ └─TableScan_32 300005811.00 cop table:lineitem, range:[-inf,+inf], keep order:false
├─TableReader_22 6286493.79 root data:Selection_21
│ └─Selection_21 6286493.79 cop eq(tpch.lineitem.l_shipinstruct, "DELIVER IN PERSON"), in(tpch.lineitem.l_shipmode, "AIR", "AIR REG"), or(and(ge(tpch.lineitem.l_quantity, 4), le(tpch.lineitem.l_quantity, 14)), or(and(ge(tpch.lineitem.l_quantity, 18), le(tpch.lineitem.l_quantity, 28)), and(ge(tpch.lineitem.l_quantity, 29), le(tpch.lineitem.l_quantity, 39))))
│ └─TableScan_20 300005811.00 cop table:lineitem, range:[-inf,+inf], keep order:false
└─TableReader_28 8000000.00 root data:Selection_27
└─Selection_27 8000000.00 cop ge(tpch.part.p_size, 1), or(and(eq(tpch.part.p_brand, "Brand#52"), and(in(tpch.part.p_container, "SM CASE", "SM BOX", "SM PACK", "SM PKG"), le(tpch.part.p_size, 5))), or(and(eq(tpch.part.p_brand, "Brand#11"), and(in(tpch.part.p_container, "MED BAG", "MED BOX", "MED PKG", "MED PACK"), le(tpch.part.p_size, 10))), and(eq(tpch.part.p_brand, "Brand#51"), and(in(tpch.part.p_container, "LG CASE", "LG BOX", "LG PACK", "LG PKG"), le(tpch.part.p_size, 15)))))
└─TableScan_26 1.00 cop table:part, range: decided by [tpch.lineitem.l_partkey], keep order:false
Expand Down
10 changes: 10 additions & 0 deletions cmd/explaintest/t/topn_push_down.test
Original file line number Diff line number Diff line change
Expand Up @@ -182,3 +182,13 @@ create table t1(a bigint, b bigint);
create table t2(a bigint, b bigint);
desc select * from t1 where t1.a in (select t2.a as a from t2 where t2.b > t1.b order by t1.b limit 1);
desc select * from t1 where t1.a in (select a from (select t2.a as a, t1.b as b from t2 where t2.b > t1.b) x order by b limit 1);

-- test ExpectedCnt of join's children
drop table if exists t;
create table t(a int not null, index idx(a));
explain select /*+ TIDB_INLJ(t2) */ * from t t1 join t t2 on t1.a = t2.a limit 5;
explain select /*+ TIDB_INLJ(t2) */ * from t t1 left join t t2 on t1.a = t2.a where t2.a is null limit 5;
explain select /*+ TIDB_SMJ(t1, t2) */ * from t t1 join t t2 on t1.a = t2.a limit 5;
explain select /*+ TIDB_SMJ(t1, t2) */ * from t t1 left join t t2 on t1.a = t2.a where t2.a is null limit 5;
explain select /*+ TIDB_HJ(t1, t2) */ * from t t1 join t t2 on t1.a = t2.a limit 5;
explain select /*+ TIDB_HJ(t1, t2) */ * from t t1 left join t t2 on t1.a = t2.a where t2.a is null limit 5;
1 change: 1 addition & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ var defaultConf = Config{
Level: "info",
Format: "text",
File: logutil.NewFileLogConfig(true, logutil.DefaultLogMaxSize),
SlowQueryFile: "tidb-slow.log",
SlowThreshold: logutil.DefaultSlowThreshold,
ExpensiveThreshold: 10000,
QueryLogMaxLen: logutil.DefaultQueryLogMaxLen,
Expand Down
2 changes: 1 addition & 1 deletion config/config.toml.example
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ format = "text"
disable-timestamp = false

# Stores slow query log into separated files.
slow-query-file = ""
slow-query-file = "tidb-slow.log"

# Queries with execution time greater than this value will be logged. (Milliseconds)
slow-threshold = 300
Expand Down
Loading

0 comments on commit 2139e8d

Please sign in to comment.