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: Gavin M. Roy <gmr@ehpg.net>
Cc: pgsql-performance@postgresql.org
Subject: Re: postgres 7.4 at 100%
Date: Wed, 30 Jun 2004 15:30:52 +0800
Message-ID: <40E26C2C.9080601@familyhealth.com.au> (raw)
In-Reply-To: <e071108e040630001973bb802e@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>


> Why would I or would I not create multiple indexes in a table? I
> created another index in the same table an it's improved performance
> even more.

You create indexes when you need indexes.  Indexes are most helpful when 
they match the WHERE clause of your selects.

So, if you commonly do one query that selects on one column, and another 
query that selects on two other columns - then create one index on the 
first column and another index over the second two columns.

Chris



view thread (24+ messages)  latest in thread

Message-ID: <40E26C2C.9080601@familyhealth.com.au>
Permalink:  ../40E26C2C.9080601@familyhealth.com.au/
Also on:    postgresql.org/message-id/40E26C2C.9080601@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, gmr@ehpg.net
  Subject: Re: postgres 7.4 at 100%
  In-Reply-To: <40E26C2C.9080601@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>

* 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