List:Internals« Previous MessageNext Message »
From:Sergei Golubchik Date:June 30 2006 8:07am
Subject:Re: High precision time
View as plain text  
Hi!

On Jun 29, bwillits@stripped wrote:
> 2 questions:
> 
> 1) Is there a function to return the current time to a precision of
> milliseconds ( ie. micronow() )?  

Not that I know of.
 
> 2) is there a function to return the elapsed time of the last query
> executed (similar to found_rows()).

Not that I know of.
 
> The reason I ask is that I am trying to track and store the times it
> takes to run my stored procedure. So, within the procedure I would
> like to store the time at the start and again at the end and then do a
> calculation to get the difference which I would then store in a
> logging table. 
> 
> If the answer is no, can you point me to the code for now() or similar
> so I could investigate adding such a function?

The most simple solution would be to write an udf that returns the time
with whatever precision you want.
 
Regards,
Sergei

-- 
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /   Sergei Golubchik <serg@stripped>
 / /|_/ / // /\ \/ /_/ / /__  MySQL AB, Senior Software Developer
/_/  /_/\_, /___/\___\_\___/  Kerpen, Germany
       <___/  www.mysql.com
Thread
High precision timebwillits29 Jun
  • RE: High precision timeRick James29 Jun
  • Re: High precision timeSergei Golubchik30 Jun
RE: High precision timebwillits29 Jun
  • Re: High precision timeWojciech Meler30 Jun
Re: High precision timebwillits30 Jun
Re: High precision timebwillits1 Jul