Re: Do non-sequential primary keys slow performance significantly?? - Mailing list pgsql-novice

From Richard Broersma Jr
Subject Re: Do non-sequential primary keys slow performance significantly??
Date
Msg-id 20060929151023.78307.qmail@web31802.mail.mud.yahoo.com
Whole thread Raw
In response to Do non-sequential primary keys slow performance significantly??  ("Damian C" <jamianb@gmail.com>)
Responses Re: Do non-sequential primary keys slow performance significantly??
List pgsql-novice
> The most difficult part of this question is justifying WHY we would
> want to use random primary keys!  There is a very strong reason for
> doing so, although not quite compelling.

One problem with using random generated primary keys that I've
recently read about deal with insert failing do to primary key
duplication.

If the size of your dataset grows to become a significant percentage
of the size of the integer type used for your random primary key,
the probability of inserting a duplicated number dramatically
increases.  I imagine that this problem could contribute to poor
preformance for large bulk inserts that have to add logic for
dealing with re-trying a insert if a duplicate number is created.

Regards,

Richard Broersma Jr.

pgsql-novice by date:

Previous
From: Shane Ambler
Date:
Subject: Re: Do non-sequential primary keys slow performance
Next
From: Brian Hurt
Date:
Subject: Postgres locking up?