From 511158db3f4557945c2731d638370764982c2551 Mon Sep 17 00:00:00 2001 From: Ran Date: Thu, 11 Jun 2020 23:24:19 +0800 Subject: [PATCH 1/2] Update identify-slow-queries.md --- identify-slow-queries.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/identify-slow-queries.md b/identify-slow-queries.md index df9303e58c522..8ffa62803e7c5 100644 --- a/identify-slow-queries.md +++ b/identify-slow-queries.md @@ -33,6 +33,8 @@ TiDB enables the slow query log by default. You can enable or disable the featur # Cop_backoff_rpcPD_total_times: 200 Cop_backoff_rpcPD_total_time: 0.2 Cop_backoff_rpcPD_max_time: 0.2 Cop_backoff_rpcPD_max_addr: 127.0.0.1 Cop_backoff_rpcPD_avg_time: 0.2 Cop_backoff_rpcPD_p90_time: 0.2 # Cop_backoff_rpcTiKV_total_times: 200 Cop_backoff_rpcTiKV_total_time: 0.2 Cop_backoff_rpcTiKV_max_time: 0.2 Cop_backoff_rpcTiKV_max_addr: 127.0.0.1 Cop_backoff_rpcTiKV_avg_time: 0.2 Cop_backoff_rpcTiKV_p90_time: 0.2 # Mem_max: 525211 +# Prepared: false +# Plan_from_cache: false # Succ: true # Plan: tidb_decode_plan('ZJAwCTMyXzcJMAkyMAlkYXRhOlRhYmxlU2Nhbl82CjEJMTBfNgkxAR0AdAEY1Dp0LCByYW5nZTpbLWluZiwraW5mXSwga2VlcCBvcmRlcjpmYWxzZSwgc3RhdHM6cHNldWRvCg==') insert into t select * from t; From 9434ff79581a7249c54c15de52524b747702ade5 Mon Sep 17 00:00:00 2001 From: Ran Date: Fri, 12 Jun 2020 14:40:21 +0800 Subject: [PATCH 2/2] add two missing lines --- identify-slow-queries.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/identify-slow-queries.md b/identify-slow-queries.md index 8ffa62803e7c5..31b08b5d597d4 100644 --- a/identify-slow-queries.md +++ b/identify-slow-queries.md @@ -60,6 +60,8 @@ Slow query basics: * `Succ`: Whether a statement is executed successfully. * `Backoff_time`: The waiting time before retry when a statement encounters errors that require a retry. The common errors as such include: `lock occurs`, `Region split`, and `tikv server is busy`. * `Plan`: The execution plan of the statement. Use the `select tidb_decode_plan('xxx...')` statement to parse the specific execution plan. +* `Prepared`: Whether this statement is a `Prepare` or `Execute` request or not. +* `Plan_from_cache`: Whether this statement hits the execution plan cache. The following fields are related to transaction execution: