Well, without changing any other configuration options, i setup slow-query-log and i set slow_query_time=1 (to 1 second), and i get output like this:
# Time: 100609 13:21:19
# User@Host: user[user] @ host []
# Query_time: 0.000330 Lock_time: 18446744073709.550781 Rows_sent: 2 Rows_examined: 6
use database;
SET timestamp=1276107679;
call Admin_System_Variable_List();
I didn't want to come back with more questions, if i could help it, so i googled and googled to try to find out what the heck the lock time actually means, and could not find anything that gives its unit of measurement (cpu cycles, microseconds, etc). I thought that i DID see someone say that it is NOT cpu cycles, but they never said what it IS. Do you know what that number means? FYI, the contents of that procedure are a VERY simple select statement against a table only containing 2 rows (select name,value from System_Variable;), not long at all.
So, i see that the execution time is 3 millionths of a second, and i have no clue what the lock time means, but i know that it is ALWAYS less than the execution time***, so i don't understand why this was logged, unless mysql is counting TOTAL CONNECTION TIME as the value of slow_query_time, which i don't see why that would be the case...
I didn't run php's microtime, because the pages load way faster than 1 second (normally), and further more (and primarily) because i didn't know if execution should be measured at the page level (at the beginning and end of the page), or at the procedure level (before and after the procedure call), because most pages have several procedure calls in them.
Thanks again for any help.
*** from what i understood in the code i seen, query time and lock_time start at the beginning of the query, and then lock time stops counting after the where clause is satisfied, and the locks are released, and THAT is when the query does the update, having known what rows to update at that point, and thus no longer needing the locks; perhaps i could have misinterpreted this too...
premium domain names that i'm selling
Edited 1 time(s). Last edit at 06/10/2010 11:32PM by Vector Thorn.