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

Posted on 2007-08-02
Last Modified: 2012-08-13
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.

Question by:dchell
    LVL 35

    Expert Comment

    sorry, you can't - unless you want to hack the code to use an rpc call to the server

    Author Comment

    mmm, well that's seriously dissapointing.
    LVL 7

    Accepted Solution

    You could try the query profiling option released in 5.0.37 community version.

    Author Comment

    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.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Join & Write a Comment

    As a database administrator, you may need to audit your table(s) to determine whether the data types are optimal for your real-world data needs.  This Article is intended to be a resource for such a task. Preface The other day, I was involved …
    Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    731 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now