dbTalk Databases Forums  

Stored Procedure Performance Timing???

comp.databases.mysql comp.databases.mysql


Discuss Stored Procedure Performance Timing??? in the comp.databases.mysql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
fuglyducky
 
Posts: n/a

Default Stored Procedure Performance Timing??? - 12-03-2010 , 07:11 AM






Does anyone know if there is any way to get a high precision (think
microseconds) time from within a sproc? I'd like to time a few of my
sprocs to get a better idea of how they are performing. Something like
this...

get start_time
do some sql magic here
get end_time

time_diff = end_time - start_time

Is this possible with MySQL? If so, would you be able to provide an
example? (I'm really new to MySQL and DBs in general so any additional
information you have would be greatly appreciated.)

Thanks!!!!

Reply With Quote
  #2  
Old   
fuglyducky
 
Posts: n/a

Default Re: Stored Procedure Performance Timing??? - 12-03-2010 , 07:12 AM






On Dec 3, 5:11*am, fuglyducky <fuglydu... (AT) gmail (DOT) com> wrote:
Quote:
Does anyone know if there is any way to get a high precision (think
microseconds) time from within a sproc? I'd like to time a few of my
sprocs to get a better idea of how they are performing. Something like
this...

get start_time
do some sql magic here
get end_time

time_diff = end_time - start_time

Is this possible with MySQL? If so, would you be able to provide an
example? (I'm really new to MySQL and DBs in general so any additional
information you have would be greatly appreciated.)

Thanks!!!!
I should add that I tried to use (SELECT DATE_FORMAT(NOW(),'%s.%f'));
but the output is always x.000000.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.