[Bucardo-general] private key vs. unique index

Joshua Tolley josh at endpoint.com
Fri Apr 15 19:50:57 UTC 2011


On Fri, Apr 15, 2011 at 01:59:56PM -0400, Marc Farnum Rendino wrote:
> However, a thought just occurred to me: I came into this, presuming
> that a unique index is simpler/cheaper than a private key - is this
> true?
> 
> Since I could use either, I should probably use the better one from
> the start. :)

Primary keys are easier for some things to deal with, sometimes, because of
the special extras Greg mentioned that mark them as primary keys; on the other
hand, unique keys can be created and replaced without locking the table
particularly. Sometimes that's useful. I'd recommend primary keys, myself,
because it's a pretty standard principle of database design that every table
should have a primary key.

-- 
Josh Tolley   josh at endpoint.com   801-987-0252
End Point Corporation  http://www.endpoint.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : https://mail.endcrypt.com/pipermail/bucardo-general/attachments/20110415/d607baf4/attachment.bin 


More information about the Bucardo-general mailing list