Re: Change sort order on UUIDs? - Mailing list pgsql-hackers

From Gregory Stark
Subject Re: Change sort order on UUIDs?
Date
Msg-id 87ir9qtbf5.fsf@oxford.xeocode.com
Whole thread Raw
In response to Change sort order on UUIDs?  ("Robert Wojciechowski" <robertw@expressyard.com>)
Responses Re: Change sort order on UUIDs?  ("Robert Wojciechowski" <robertw@expressyard.com>)
List pgsql-hackers
"Robert Wojciechowski" <robertw@expressyard.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



pgsql-hackers by date:

Previous
From: "Robert Wojciechowski"
Date:
Subject: Re: Change sort order on UUIDs?
Next
From: Gregory Stark
Date:
Subject: Re: Change sort order on UUIDs?