Re: [PERFORM] UUID as primary key

2009-10-16 Thread decibel
On Oct 10, 2009, at 10:40 AM, Mark Mielke wrote: On 10/10/2009 01:14 AM, tsuraan wrote: The most significant impact is that it takes up twice as much space, including the primary key index. This means fewer entries per block, which means slower scans and/or more blocks to navigate through. Sti

Re: [PERFORM] UUID as primary key

2009-10-16 Thread Alvaro Herrera
decibel escribió: > >If you want it to be seemless and fully optimal, you would > >introduce a new int256 type (or whatever the name of the type you > >are trying to represent). Adding new types to PostgreSQL is not > >that hard. This would allow queries (=, <>, <, >) as well. > > If you want an

Re: [PERFORM] UUID as primary key

2009-10-16 Thread decibel
On Oct 10, 2009, at 10:40 AM, Mark Mielke wrote: On 10/10/2009 01:14 AM, tsuraan wrote: The most significant impact is that it takes up twice as much space, including the primary key index. This means fewer entries per block, which means slower scans and/or more blocks to navigate through. Sti

Re: [PERFORM] UUID as primary key

2009-10-10 Thread Mark Mielke
On 10/10/2009 01:14 AM, tsuraan wrote: The most significant impact is that it takes up twice as much space, including the primary key index. This means fewer entries per block, which means slower scans and/or more blocks to navigate through. Still, compared to the rest of the overhead of an index

Re: [PERFORM] UUID as primary key

2009-10-09 Thread tsuraan
> The most significant impact is that it takes up twice as much space, > including the primary key index. This means fewer entries per block, > which means slower scans and/or more blocks to navigate through. Still, > compared to the rest of the overhead of an index row or a table row, it > is low

Re: [PERFORM] UUID as primary key

2009-10-09 Thread Mark Mielke
On 10/09/2009 12:56 PM, tsuraan wrote: I have a system where it would be very useful for the primary keys for a few tables to be UUIDs (actually MD5s of files, but UUID seems to be the best 128-bit type available). What is the expected performance of using a UUID as a primary key which will have

[PERFORM] UUID as primary key

2009-10-09 Thread tsuraan
I have a system where it would be very useful for the primary keys for a few tables to be UUIDs (actually MD5s of files, but UUID seems to be the best 128-bit type available). What is the expected performance of using a UUID as a primary key which will have numerous foreign references to it, versu