From: | Chris Cheston <ccheston(at)gmail(dot)com> |
---|---|
To: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: postgres 7.4 at 100% |
Date: | 2004-06-30 07:34:52 |
Message-ID: | e071108e040630003475e9ac81@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
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.
Thanks,
Chis
On Wed, 30 Jun 2004 15:30:52 +0800, Christopher Kings-Lynne
<chriskl(at)familyhealth(dot)com(dot)au> wrote:
>
>
> > 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
>
From | Date | Subject | |
---|---|---|---|
Next Message | Christopher Kings-Lynne | 2004-06-30 10:02:50 | Re: postgres 7.4 at 100% |
Previous Message | Christopher Kings-Lynne | 2004-06-30 07:30:52 | Re: postgres 7.4 at 100% |