Re: TODO item: GUID - Mailing list pgsql-hackers

From Aleksandar Dezelin
Subject Re: TODO item: GUID
Date
Msg-id ea977f560609091047p4d56cb71gdb25afc935939126@mail.gmail.com
Whole thread Raw
In response to TODO item: GUID  (Gevik Babakhani <pgdev@xs4all.nl>)
Responses Re: TODO item: GUID  (mark@mark.mielke.cc)
List pgsql-hackers
Hello,

you just have to make random 128 bits and set version bits. And that's all.

This is the way this data type is implemented in Mono ( http://svn.myrealbox.com/source/trunk/mcs/class/corlib/System/Guid.cs).

Using time based GUIDs in database tables is not a good choice for performance reasons because they can not be indexed properly - every newly created time-based GUID is guaranteed to be larger than all previously created, so RDBMS engine must re balance b-tree every time a new GUID item is added to data table.

Sorry, for sending this message three times - problem with Gmail.

Cheers,
Aleksandar Dezelin

pgsql-hackers by date:

Previous
From: David Fetter
Date:
Subject: Re: log_duration is redundant, no?
Next
From: Tom Lane
Date:
Subject: Re: @ versus ~, redux