# Case Studies - Which query should be optimize first?
![`smart`](TiDBMonitorSQLPerf0401_en_001_20240125.png)
![`smart`](TiDBMonitorSQLPerf0402_en_001_20240125.png)
![`smart`](TiDBMonitorSQLPerf0403_en_002_20240125.png)

+ Query <A>
  + Only executed twice
  + Both `Mean Visible Versions Per Query` and `Mean Meet Versions Per Query` are 0
  + The time consumption might be due to a bottleneck at the TiDB server layer, such as locks.

------------------------------------------------------------------------------
In example `<A>`, the SQL statement has a `Total Latency` of 50.0 seconds, the longest among the three statements. However, its `# Exec` is only two, indicating occasional execution. Both `Mean Visible Versions Per Query` and `Mean Meet Versions Per Query` are 0, suggesting no read operations occur at the TiKV server layer. The time consumption might be due to a bottleneck at the TiDB server layer, such as locks. Therefore, while it's important to examine whether this statement is being blocked, it is unlikely to significantly impact the overall performance of the database system.