pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christopher Kings-Lynne <chriskl@familyhealth.com.au>
To: Chris Cheston <ccheston@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: postgres 7.4 at 100%
Date: Wed, 30 Jun 2004 18:02:50 +0800
Message-ID: <40E28FCA.4010409@familyhealth.com.au> (raw)
In-Reply-To: <e071108e040630003475e9ac81@mail.gmail.com>
References: <e071108e04062423591d2b8aa9@mail.gmail.com>
	<1088397641.1105.10.camel@localhost>
	<17884.1088399982@sss.pgh.pa.us>
	<200406280947.59420.josh@agliodbs.com>
	<e071108e0406290100338c171d@mail.gmail.com>
	<40E1266D.3040607@familyhealth.com.au>
	<e071108e04062901377f6591c9@mail.gmail.com>
	<40E192CC.90707@ehpg.net>
	<e071108e040630001973bb802e@mail.gmail.com>
	<40E26C2C.9080601@familyhealth.com.au>
	<e071108e040630003475e9ac81@mail.gmail.com>

> I see - thanks very much. I created an index for column 'oid' which I
> was using in a WHERE.  So rule of thumb- create an index for column(s)
> which I use in WHERE queries.

So to speak.  They can also sometimes assist in sorting.  The OID column 
is special.  I suggest adding a unique index to that column.  In 
postgresql it is _possible_ for the oid counter to wraparound, hence if 
you rely on oids (not necessarily a good idea), it's best to put a 
unique index on the oid column.

I _strongly_ suggest that you read this:

http://www.postgresql.org/docs/7.4/static/indexes.html

Chris




view thread (24+ messages)  latest in thread

Message-ID: <40E28FCA.4010409@familyhealth.com.au>
Permalink:  ../40E28FCA.4010409@familyhealth.com.au/
Also on:    postgresql.org/message-id/40E28FCA.4010409@familyhealth.com.au

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: chriskl@familyhealth.com.au, ccheston@gmail.com
  Subject: Re: postgres 7.4 at 100%
  In-Reply-To: <40E28FCA.4010409@familyhealth.com.au>
  References: <e071108e04062423591d2b8aa9@mail.gmail.com> <1088397641.1105.10.camel@localhost> <17884.1088399982@sss.pgh.pa.us> <200406280947.59420.josh@agliodbs.com> <e071108e0406290100338c171d@mail.gmail.com> <40E1266D.3040607@familyhealth.com.au> <e071108e04062901377f6591c9@mail.gmail.com> <40E192CC.90707@ehpg.net> <e071108e040630001973bb802e@mail.gmail.com> <40E26C2C.9080601@familyhealth.com.au> <e071108e040630003475e9ac81@mail.gmail.com> <40E28FCA.4010409@familyhealth.com.au>

* 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