Re: Change sort order on UUIDs?

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Robert Wojciechowski" <robertw(at)expressyard(dot)com>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Change sort order on UUIDs?
Date: 2007-06-14 22:32:14
Message-ID: 87ir9qtbf5.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


"Robert Wojciechowski" <robertw(at)expressyard(dot)com> writes:

> When done that way, you're going to see a lot of index B-tree
> fragmentation with even DCE 1.1 (ISO/IEC 11578:1996) time based UUIDs,
> as described above. With random (version 4) or hashed based (version 3
> or 5) UUIDs there's nothing that can be done to improve the situation,
> obviously.

Is this based on empirical results or just a theory? I'm asking because it's
actually a common technique to reverse the natural index key to construct
basically exactly this situation -- for performance reasons. The idea is that
low order bits have higher cardinality and that that can *improve* btree
performance by avoiding contention.

I'm not sure how much I believe in the effectiveness of that strategy myself
or for that matter whether it's universally applicable or only useful in
certain types of loads.

I'm not saying you're wrong, but I'm not sure it's a simple open and shut case
either.

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gregory Stark 2007-06-14 22:37:32 Re: Change sort order on UUIDs?
Previous Message Robert Wojciechowski 2007-06-14 22:22:54 Re: Change sort order on UUIDs?