Bug #28539 A function to get microseconds from system time ?
Submitted: 19 May 2007 22:34 Modified: 14 Jun 2013 19:33
Reporter: Nicolae Namolovan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S4 (Feature request)
Version:5.1 OS:Any
Assigned to: Matthew Lord CPU Architecture:Any
Tags: microseconds

[19 May 2007 22:34] Nicolae Namolovan
Description:
I need to benchmark a query to see how fast it execute with the microseconds exactity.

I'm really surprised there's no function what can give me current time with microseconds precision.. Even the 5.1 beta don't have such function.. wired

How to repeat:
feature-request, SELECT NOW() don't return microseconds
[21 May 2007 7:35] Nicolae Namolovan
the title was changed a bit..
[24 May 2007 6:20] Valeriy Kravchuk
Thank you for a reasonable feature request.
[21 Jun 2008 7:37] Damien Filiatrault
This would be a useful feature for generating sequential, unique integer ids.  Sequential, unique integer ids would be great for join efficiency as compared with UUID().
[14 Jun 2013 19:33] Matthew Lord
Hi Nicolae,

Thank you for the feature request, and for helping to make MySQL even better!

I'm closing this now, as MySQL 5.6 added support for this general feature:

I'm closing this FR as it has been implemented in 5.6:

mysql> select sysdate(6);
+----------------------------+
| sysdate(6)                 |
+----------------------------+
| 2013-06-14 15:32:54.487003 |
+----------------------------+
1 row in set (0.00 sec)

mysql> select microsecond(sysdate(6));
+-------------------------+
| microsecond(sysdate(6)) |
+-------------------------+
|                  688874 |
+-------------------------+
1 row in set (0.00 sec)

Thanks again!