MySQL Forums
Forum List  »  Performance

How to interpret the value of timer_wait in events_statements_current?
Posted by: Sherry Wu
Date: June 14, 2018 03:01AM

Version: MySQL 5.7

I’d like to find the execution time of a sql using the table events_statements_current. But the value of timer_wait is not right. For one single insert, the timer_wait value is as large as 30126916000, which is around 30 seconds. As shown below:

The insert statement is:
mysql> insert into t1 values (1), (2), (3);
Query OK, 3 rows affected (0.04 sec)

The content in the table events_statements_current is:
mysql> select timer_start, timer_end, timer_wait from events_statements_current where sql_text like 'insert into t1%';
+-----------------+-----------------+-------------+
| timer_start | timer_end | timer_wait |
+-----------------+-----------------+-------------+
| 289657408109000 | 289687535025000 | 30126916000 |
+-----------------+-----------------+-------------+
1 row in set (0.00 sec)

I checked the setup_timer, it shows:

mysql> select * from setup_timers;
+-------------+-------------+
| NAME | TIMER_NAME |
+-------------+-------------+
| idle | MICROSECOND |
| wait | CYCLE |
| stage | NANOSECOND |
| statement | NANOSECOND |
| transaction | NANOSECOND |
+-------------+-------------+
5 rows in set, 1 warning (0.00 sec)

Does anyone know how to interpret the value of timer_wait?

Thanks
Sherry

Options: ReplyQuote


Subject
Views
Written By
Posted
How to interpret the value of timer_wait in events_statements_current?
125
June 14, 2018 03:01AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.