You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: identify-slow-queries.md
+21Lines changed: 21 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -101,6 +101,8 @@ The following fields are related to transaction execution:
101
101
*`Write_keys`: The count of keys that the transaction writes to the Write CF in TiKV.
102
102
*`Write_size`: The total size of the keys or values to be written when the transaction commits.
103
103
*`Prewrite_region`: The number of TiKV Regions involved in the first phase (prewrite) of the two-phase transaction commit. Each Region triggers a remote procedure call.
104
+
*`Wait_prewrite_binlog_time`: The time used to write binlogs when a transaction is committed.
105
+
*`Resolve_lock_time`: The time to resolve or wait for the lock to be expired after a lock is encountered during a transaction commit.
*`Cop_wait_p90`: The P90 waiting time of cop-tasks.
134
136
*`Cop_wait_max`: The maximum waiting time of cop-tasks.
135
137
*`Cop_wait_addr`: The address of the cop-task whose waiting time is the longest.
138
+
*`Rocksdb_delete_skipped_count`: The number of scans on deleted keys during RocksDB reads.
139
+
*`Rocksdb_key_skipped_count`: The number of deleted (tombstone) keys that RocksDB encounters when scanning data.
140
+
*`Rocksdb_block_cache_hit_count`: The number of times RocksDB reads data from the block cache.
141
+
*`Rocksdb_block_read_count`: The number of times RocksDB reads data from the file system.
142
+
*`Rocksdb_block_read_byte`: The amount of data RocksDB reads from the file system.
143
+
*`Rocksdb_block_read_time`: The time RocksDB takes to read data from the file system.
136
144
*`Cop_backoff_{backoff-type}_total_times`: The total times of backoff caused by an error.
137
145
*`Cop_backoff_{backoff-type}_total_time`: The total time of backoff caused by an error.
138
146
*`Cop_backoff_{backoff-type}_max_time`: The longest time of backoff caused by an error.
139
147
*`Cop_backoff_{backoff-type}_max_addr`: The address of the cop-task that has the longest backoff time caused by an error.
140
148
*`Cop_backoff_{backoff-type}_avg_time`: The average time of backoff caused by an error.
141
149
*`Cop_backoff_{backoff-type}_p90_time`: The P90 percentile backoff time caused by an error.
142
150
151
+
`backoff-type` generally includes the following types:
152
+
153
+
*`tikvRPC`: The backoff caused by failing to send RPC requests to TiKV.
154
+
*`tiflashRPC`: The backoff caused by failing to send RPC requests to TiFlash.
155
+
*`pdRPC`: The backoff caused by failing to send RPC requests to PD.
156
+
*`txnLock`: The backoff caused by lock conflicts.
157
+
*`regionMiss`: The backoff caused by that processing requests fails when the TiDB Region cache information is outdated after Regions are split or merged.
158
+
*`regionScheduling`: The backoff caused by that TiDB cannot process requests when Regions are being scheduled and the Leader is not selected.
159
+
*`tikvServerBusy`: The backoff caused by that the TiKV load is too high to handle new requests.
160
+
*`tiflashServerBusy`: The backoff caused by that the TiFlash load is too high to handle new requests.
161
+
*`tikvDiskFull`: The backoff caused by that the TiKV disk is full.
162
+
*`txnLockFast`: The backoff caused by that locks are encountered during data reads.
163
+
143
164
## Related system variables
144
165
145
166
*[`tidb_slow_log_threshold`](/system-variables.md#tidb_slow_log_threshold): Sets the threshold for the slow log. The SQL statement whose execution time exceeds this threshold is recorded in the slow log. The default value is 300 (ms).
0 commit comments