-
The slow query definition for TiDB is in the TiDB configuration file. The
slow-threshold: 300
parameter is used to configure the threshold value of the slow query (unit: millisecond). -
If a slow query occurs, you can locate the
tidb-server
instance where the slow query is and the slow query time point using Grafana and find the SQL statement information recorded in the log on the corresponding node. -
In addition to the log, you can also view the slow query using the
ADMIN SHOW SLOW
command. For details, seeADMIN SHOW SLOW
command.