|Problems? Is your data what you think it is?|
Re^3: MySQL Query Time DBIby zebedee (Pilgrim)
|on Nov 10, 2008 at 07:11 UTC||Need Help??|
Illuminatus is correct - the time comes from the mysql command client.
Not that it helps the OP, but I was interested in finding out about this (and one of the key points of Open Source is that you CAN look at the source!)
(Based on MySQL 5.0.51a, OpenBSD port)
(around line 2049)
(line 2092) timer=start_timer();
(line 2137) mysql_end_timer(timer,time_buff);
(line 2170 - the "n rows in set" message)
(line 2195) strmov(pos, time_buff);
So, what does mysql_end_timer put in time_buff?
(line 3726, same file, builds the "(" and ")", calling nice_time for the seconds display)
(line 3695 - builds the "n sec" part)
And, so, finally, what does start_timer() do? (line 3684)
Assuming we are not running on WIN/OS2/NETWARE, we can see what times does:
BUT converting this into Perl is for another day!