Re: UUID, performance of primary keys - Mailing list pgsql-novice

From Sean Davis
Subject Re: UUID, performance of primary keys
Date
Msg-id 264855a00906180500w6ea867b6v81fb024177e64101@mail.gmail.com
Whole thread Raw
In response to UUID, performance of primary keys  ("Andreas Junius" <andreas@junius.info>)
List pgsql-novice


On Thu, Jun 18, 2009 at 3:24 AM, Andreas Junius <andreas@junius.info> wrote:
Hi Postgres professionals,

I'd like to use UUID for object id's (java.util.UUID). Such an object consists of two long values. I could now use two columns (int8) in a table for the primary key or one using the string representation. But I don't know which option is the more performant one or if there exist another more suitable solution. Does anybody know more about this issue?

The ints will be faster, I believe.  However, there is a UUID data type in postgresql.  I'm not sure what its performance would be, relative to the other two options.

Sean
 

pgsql-novice by date:

Previous
From: "Andreas Junius"
Date:
Subject: UUID, performance of primary keys
Next
From: Lennin Caro
Date:
Subject: Re: problem with sequence number using a trigger