1

I'm trying understand the relationship between WAIT_MS and COUNT_STAR. Is this saying the average wait time is 3.2s and occurred 11,543 times for a total of approximately 10.5hrs of aggregate wait time?

Your response is greatly appreciated.

| EVENT_NAME                           | WAIT_MS   | COUNT_STAR |
+--------------------------------------+-----------+------------+

| wait/io/file/innodb/innodb_data_file | 3294.3345 | 11543      |

UPDATE: Sorry! It was late. Per Mark Leith's blog: http://www.markleith.co.uk/2010/09/24/tracking-mutex-locks-in-a-process-list-mysql-55s-performance_schema/

SELECT 
   EVENT_NAME, SUM_TIMER_WAIT/1000000000 WAIT_MS, COUNT_STAR 
FROM 
   performance_schema.events_waits_summary_global_by_event_name 
ORDER BY 
   SUM_TIMER_WAIT DESC, 
   COUNT_STAR DESC;
1
  • Can you please provide the full query which you use to get those statistics? I assume WAIT_MS is not used in PERFORMANCE_SCHEMA, therefore its pretty hard to answer your question without additional information.
    – Flo Doe
    Commented Apr 3, 2014 at 7:12

1 Answer 1

2

Is this saying the average wait time is 3.2s and occurred 11,543 times for a total of approximately 10.5hrs of aggregate wait time?

No, this is saying the wait occurred 11,543 times for a total aggregated wait of 3.2s. The average wait time is then 3.2s / 11,543, or 0.285 milliseconds.

Note that every file io call, including file open, read, seek, close, read, write, etc is counted, and that what is measured is FILE io (at the OS level), not DISK io (at the hardware level).

Disclosure: I happen to work at MySQL, and I am the author of the performance schema.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.