[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2007-08-02
4
Medium Priority
?
449 Views
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.

Thanks,
d.
0
Comment
Question by:dchell
  • 2
4 Comments
 
LVL 35

Expert Comment

by:Raynard7
ID: 19621666
sorry, you can't - unless you want to hack the code to use an rpc call to the server
0
 

Author Comment

by:dchell
ID: 19621699
mmm, well that's seriously dissapointing.
0
 
LVL 7

Accepted Solution

by:
db2inst1 earned 500 total points
ID: 19621718
You could try the query profiling option released in 5.0.37 community version.

http://dev.mysql.com/tech-resources/articles/using-new-query-profiler.html
0
 

Author Comment

by:dchell
ID: 19629823
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.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
In this blog post, we’ll look at how using thread_statistics can cause high memory usage.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses
Course of the Month17 days, 18 hours left to enroll

830 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