incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Landolt <d...@deanlandolt.com>
Subject Re: Re: data loading
Date Wed, 04 Feb 2009 17:54:30 GMT
On Wed, Feb 4, 2009 at 12:46 PM, Rhett Garber <rhettg@gmail.com> wrote:

> On Wed, Feb 4, 2009 at 6:09 AM, Paul Davis <paul.joseph.davis@gmail.com>
> wrote:
>
> > Third, if you have a good method for generating sorted document id's,
> > inserting sorted ID's into CouchDB *should* give you better write
> > performance. Chris Anderson had some luck with this from directly
> > within the Erlang VM. There's no reason it shouldn't apply to the HTTP
> > api as well but I haven't personally tested it just to make sure.
>
> It's advisable to create my own doc ids ? Why wouldn't they be sorted
> when couchdb creates them ?
> Or perhaps I should be asking, how are the doc ids in couchdb generated ?
>
> Rhett
>

UUIDv4, which is totally random. You could always create your doc ids based
on UUIDv1, which is based on system date and mac address. Problematically,
the date it uses isn't monotonically increasing (it goes something like
ss:mm:hh rather than hh:mm:ss), so you could always just create your own
UUIDs based on system time down (down to the lowest level) and whatever else
for the best affect.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message