Re: How to measure each MySQL query CPU utilization.
Posted by:
Rick James
Date: November 18, 2014 05:54PM
In Perl, I use Time::HiRes.
In PHP, I use microtime(true).
On Windows there is QueryPerformanceCounter.
All have resolution of somewhere around a microsecond, although it is rarely practical to go below 0.1ms.
Also, those give you _elapsed_ time, not _CPU_ time. In MySQL, CPU time is not as useful (in my opinion) as elapsed time. Elapsed includes I/O (when things are not cached), but I/O, when present, is likely to be 10 times the CPU time.
What language are you using?
Subject
Views
Written By
Posted
2949
November 18, 2014 12:59AM
Re: How to measure each MySQL query CPU utilization.
1569
November 18, 2014 05:54PM
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.