Measuring MySQL Actual Runtime

How can I measure the execution time of a request without measuring the time it spends, waiting for the lock to be released, etc.? My only idea was to constantly measure the same query and record the fastest time.

+54
optimization mysql
Jun 30 2018-12-12T00:
source share
2 answers

Run the profiler with

SET profiling = 1; 

Then complete your request.

FROM

 SHOW PROFILES; 

you see a list of queries for which the profiler has statistics. And finally, you choose which request to check with

 SHOW PROFILE FOR QUERY 1; 

or any number of your request.

What you get is a list where exactly how much time was spent during the request.

Additional information in the manual.

+107
Jun 30 '12 at 15:00
source share

The answer becomes invalid ...

SHOW PROFILE[S] deprecated from MySQL 5.6.7 and will be removed in a future release of MySQL. Use a performance scheme instead; see http://dev.mysql.com/doc/refman/5.6/en/performance-schema-query-profiling.html

+25
Sep 18 '15 at 3:26
source share



All Articles