UUID, performance of primary keys

Поиск
Список
Период
Сортировка
Искать

UUID, performance of primary keys

От:
"Andreas Junius" <andreas@junius.info>
Дата:
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?

Andreas

Re: UUID, performance of primary keys

От:
Sean Davis <sdavis2@mail.nih.gov>
Дата:


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
 

FAQ