From: Dave Cramer <pg@fastcrypt.com>
To: Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Cc: Edoardo Ceccarelli <eddy@axa.it>
Cc: pgsql-jdbc@postgresql.org <pgsql-jdbc@postgresql.org>
Cc: pgsql-performance@postgresql.org
Cc: pgsql-admin@postgresql.org
Subject: Re: [JDBC] [PERFORM] is a good practice to create an index on the
Date: Tue, 27 Apr 2004 07:59:47 -0400
Message-ID: <1083067187.14759.178.camel@localhost.localdomain> (raw)
In-Reply-To: <408DC9E1.8020704@familyhealth.com.au>
References: <408D3AE8.5020006@axa.it>
<408DC9E1.8020704@familyhealth.com.au>
AFAIK, oids aren't used for anything internally, so duplicates don't
really matter. Besides, what would you do about duplicate oid's ?
The best suggestion is of course his last, don't use them.
On Mon, 2004-04-26 at 22:48, Christopher Kings-Lynne wrote:
> > I am using the oid of the table as the main key and I've found that is
> > not indexed (maybe because I have declared another primary key in the
> > table)
> >
> > it is a good practice to create an index like this on the oid of a table?
> > CREATE INDEX idoid annuncio400 USING btree (oid);
>
> Yes it is - in fact you really should add a unique index, not just a
> normal index, as you want to enforce uniqueness of the oid column. It
> is theoretically possible to end up with duplicate oids in wraparound
> situations.
>
> Even better though is to not use oids at all, of course...
>
> Chris
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faqs/FAQ.html
>
>
>
> !DSPAM:408dcc51235334924183622!
>
>
--
Dave Cramer
519 939 0336
ICQ # 14675561
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: pg@fastcrypt.com, chriskl@familyhealth.com.au, eddy@axa.it, pgsql-jdbc@postgresql.org, pgsql-admin@postgresql.org
Subject: Re: [JDBC] [PERFORM] is a good practice to create an index on the
In-Reply-To: <1083067187.14759.178.camel@localhost.localdomain>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox