How to retrieve the current time in fractions of a second in MySQL

I have a multi-step MySQL stored procedure that takes a little while to run, and I would like to find out which statements need optimizing. Is there a way to find the current time in mill or microseconds in MySQL so I can output some simple profiling info.

Who is Participating?
db2inst1Connect With a Mentor Commented:
You could try the query profiling option released in 5.0.37 community version.
sorry, you can't - unless you want to hack the code to use an rpc call to the server
dchellAuthor Commented:
mmm, well that's seriously dissapointing.
dchellAuthor Commented:
That worked a treat, once I got 5.0.37 installed, I tried installing the latest 5.0.45 but InnoDB got sglan 11 every time on startup - had to go back to 5.0.37.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.