Questions about Top SQL Monitoring on the Monitoring Page

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 监控页面的top sql监控疑问

| username: TiDBer_Xy7fsN7j

As shown in the figure, I selected the top SQL monitoring page for the latest 5 minutes of a cluster node. The first one is an insert statement, with a duration of more than 10 seconds. What does this 10s mean? Does it mean that the execution time of an insert statement takes 10 seconds?

| username: Miracle | Original post link

Yes~

| username: TiDBer_小阿飞 | Original post link

Click on this statement to see the specific time taken.

| username: Kongdom | Original post link

Yes, Total CPU Time, but judging by the title, it feels like the time spent using the CPU, hahaha. However, shouldn’t this statement execution always be using the CPU?

| username: TiDBer_Xy7fsN7j | Original post link

Here is the remaining information:

| username: TiDBer_小阿飞 | Original post link

Plan Not Available

| username: TiDBer_Xy7fsN7j | Original post link

It indicates that it is not supported here:

| username: 像风一样的男子 | Original post link

How many times did you execute this SQL? Is this time cumulative?

| username: TiDBer_小阿飞 | Original post link

Is it a batch insert statement with values?

| username: 小龙虾爱大龙虾 | Original post link

It is not the SQL execution time of 10 seconds. It should be the CPU time consumed by this type of SQL (referring to the same SQL digest) on the currently selected node (the first selection box) within the selected time period (the second box).

| username: 有猫万事足 | Original post link

The meaning here is that insert is called 1.4 times per second, and each insert takes an average of 25.3ms.

This is very normal. It’s just that with a large cumulative number of calls, the total time reaches 10 seconds.

| username: dba远航 | Original post link

It is the execution time of INSERT CPS.

| username: Soysauce520 | Original post link

The CPU time used by a type of SQL statement is not the execution time of the SQL. The execution time can be seen in the SQL analysis.

| username: oceanzhang | Original post link

This is not the execution time of a single operation; this monitoring indicates a total of 10.x seconds. 1.4 calls/sec means you are executing 1.4 times per second, which is a relatively high frequency.

| username: oceanzhang | Original post link

If you know how to read Oracle’s AWR report, you’ll understand these meanings. Although I am also a beginner, the meanings should be similar.

| username: TiDBer_lBAxWjWQ | Original post link

Looking closely, each insert takes 25.3ms.

Total time is 10 seconds.

| username: TI表弟 | Original post link

CPU time is CPU time, waiting for I/O operations does not count.

| username: heiwandou | Original post link

Total time