# TiKV Slow Query Analysis from Grafana

![`smart`](./student-guide/diagram/TiKVSlowQueryHandling_aa_001_20221016.png)
-----------------------------------------------------------------------------

PointGet: Check primary key or unique key, get data through storage read pool, slow query Possible reasons: table hotspot; storage read pool bottleneck

`coprocessor_process`: Read data through the coprocessor. The main execution time is consumed in cop execution, indicating that the execution plan needs to read a large number of keys, which may be a full table scan or an unreasonable full table scan caused by an incorrect execution plan

`coproesssor_wait`: Read data through the coprocessor engine, and the main execution time is spent on cop waiting. Possible reasons for waiting: sub-table hotspots, index hotspots, waits caused by insufficient resources due to CPU being full.

`Commit`: Slow commit, need to pay attention to the reason for slow prewrite and commit. Generally, a CPU (raft store cpu or async apply cpu) reaches a bottleneck or disk load is high

```
Grafana --> TiKV-Details --> Coprocessor Detail --> Wait duration
Grafana --> TiKV-Details --> Coprocessor Detail --> Handle duration
TiKV-Detail -> Storage
```
