incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Lebresne <sylv...@yakaz.com>
Subject Re: TimeUUID vs Epoch
Date Fri, 13 Aug 2010 16:38:27 GMT
As long as time sorting is involved, you'll the same ordering if you
use Epoch/Long
or TimeUUID. The difference is between the ties. If when you insert
two values at
the exact same time, you want to have only one stay, then you want LongType.
If however you don't want to merge such inserts, then you want TimeUUID since
they assure you that even if generated at the exact same time, the key
will be different
(plus if your UUID generator is not too bad, it will give you better
precision than the
epoch/long one).

--
Sylvain

On Fri, Aug 13, 2010 at 6:32 PM, Mark <static.void.dev@gmail.com> wrote:
> I'm a little confused on when I should be using TimeUUID vs Epoch/Long when
> I want columns ordered by time. I know it sounds strange and the obvious
> choice should be TimeUUID but I'm not sure why that would be preferred over
> just using the Epoch stamp?
>
> The pretty much seem to accomplish the same thing however when using Epoch I
> can easily use a start/end range for querying across times. Can this be
> accomplished using TimeUUID?
>
> Would someone also explain how TimeUUID is actually sorted? Im confused on
> how its actually compared. Thanks!
>
>
>

Mime
View raw message