0

When I run a SQL in MySql or I use the BENCHMARK command, I get a result like the following:

2 rows in set (0.00 sec)

0.00 sec isn't very meaningful for some queries, and sometimes more precision is needed to figure out how long a query took in an even smaller unit of time. How do you do this in MySql?

stevebot
  • 23,275
  • 29
  • 119
  • 181

1 Answers1

1

Look into Profilers, such as http://www.jetprofiler.com/ and others...

Also, this question has some suggestions: Is there a Profiler equivalent for MySql?

Community
  • 1
  • 1
MatBailie
  • 83,401
  • 18
  • 103
  • 137
  • Cool, thanks for the reply. Is there anything native to MySQL that will let me get better precision though? – stevebot Dec 20 '11 at 17:00
  • I don't use MySQL, but you could try it manually using CURTIME()? If you `SELECT CURTIME() + 0` (the +0 is necessary), do you still just get the time in seconds, or does the micro-seconds part (after the decimal point) actually get filled in? – MatBailie Dec 20 '11 at 17:20