Measuring actual MySQL query time

Start the profiler with

SET profiling = 1;

Then execute your Query.

With

SHOW PROFILES;

you see a list of queries the profiler has statistics for. And finally you choose which query to examine with

SHOW PROFILE FOR QUERY 1;

or whatever number your query has.

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

More info in the manual.

Leave a Comment