dbTalk Databases Forums  

Re: Getting finer DATETIME granularity

comp.databases.mysql comp.databases.mysql


Discuss Re: Getting finer DATETIME granularity in the comp.databases.mysql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
J.O. Aho
 
Posts: n/a

Default Re: Getting finer DATETIME granularity - 01-30-2011 , 09:23 AM






Puzzled wrote:
Quote:
I have a project using v5.1 where it would be very convenient to
RANGE partition by the DATETIME a group of related records was
begun, i.e. the DATETIME of the first record in the group.

Unfortunately, the granularity of that datatype is only 1 second,
which is quite coarse: someone else could begin another group
within that same second, thus making the index non-unique.

Can someone suggest something I've overlooked that would do the
job? I looked at the MICROSECOND function, which seemed ideal
til I tested it ( SELECT MICROSECOND(NOW()+0) )and found it
always returns 0.

Thanks in advance for any ideas.
Think this will be interesting for you to read:

http://bugs.mysql.com/bug.php?id=8523

There is a custom fix for this, but then you will need custom MySQL.

--

//Aho

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.