Re: "Overlaping" indexes

From: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
To: Tomasz Myrta <jasiek(at)klaster(dot)net>
Cc: Rigmor Ukuhe <rigmor(dot)ukuhe(at)finestmedia(dot)com>, <pgsql-performance(at)postgresql(dot)org>
Subject: Re: "Overlaping" indexes
Date: 2004-02-02 18:30:36
Message-ID: Pine.LNX.4.33.0402021129520.19673-100000@css120.ihs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Mon, 2 Feb 2004, Tomasz Myrta wrote:

> Dnia 2004-02-02 15:46, U?ytkownik Rigmor Ukuhe napisa3:
> > Hi,
> >
> > I have many indexes somehow overlaping like:
> > ... btree ("STATUS", "VISIBLE", "NP_ID");
> > ... btree ("STATUS", "VISIBLE");
> >
> > is perfomance gained by "more exact" index worth overhead with managing
> > indexes.
>
> The second (2 columns) index is useless - it's function is well done by
> the first one (3 columns).

Not entirely, since it only has to sort two columns, it will be smaller,
and will therefore be somewhat faster.

On the other hand, I've seen a lot of folks create multi column indexes
who didn't really understand how they work in Postgresql.

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tomasz Myrta 2004-02-02 18:43:03 Re: "Overlaping" indexes
Previous Message Adam Ruth 2004-02-02 18:06:24 Re: MySQL+InnoDB vs. PostgreSQL test?