Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHPMyAdmin's 'Query took' time differs from MySQL Profiling information

Using the new MySQL Query Profiler in PHPMyAdmin version 2.11.5, I got following results (PNG-version)

Status              Time
(initialization)    0.00004
Opening tables      0.000059
System lock         0.000003
Table lock          0.000006
init                0.000013
optimizing          0.000004
statistics          0.000015
preparing           0.000012
executing           0.000028
Sending data        0.000129
end                 0.000003
query end           0.000002
freeing items       0.000003
closing tables      0.000001
removing tmp table  0.000007
closing tables      0.000002
logging slow query  0.000001

Showing rows 0 - 29 (29,128 total, Query took 1.6200 sec)

When I add those times, I get 0.000328. I'm wondering why PHPMyAdmin reports 1.6200 secs?

like image 782
Konerak Avatar asked Apr 14 '26 16:04

Konerak


1 Answers

Query Profiler doesn't take into account the actual time it takes for the data to move between the database and the back end. There might be other factors involved, but basically PHPMyAdmin records the whole chain (and perhaps not that accurately) whereas Query Profiler only measures the actions taken inside the database.

like image 149
Tatu Ulmanen Avatar answered Apr 17 '26 06:04

Tatu Ulmanen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!