Re: Multiple Indexes - Mailing list pgsql-general

From Peter Eisentraut
Subject Re: Multiple Indexes
Date
Msg-id Pine.LNX.4.30.0107021826210.677-100000@peter.localdomain
Whole thread Raw
In response to Multiple Indexes  ("dennis@zserve.com" <dennis@zserve.com>)
List pgsql-general
dennis@zserve.com writes:

> If I were to define and index like this:
>
> 1) create index i on sometable ( name, somedata );
>
> and another one like this:
>
> 2) create index i2 on sometable ( name );
>
> Would that be better than defining only the first index?

While this kind of question is generally best answered through
experimentation and analysis of the actual query load, note that this
combination of indexes would be quite useless, because queries on "name"
could very well use the (name, somedata) index.

--
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter


pgsql-general by date:

Previous
From: Robert Berger
Date:
Subject: query optimizer questions
Next
From: "Clinton James"
Date:
Subject: pqReadData() -- backend closed on COPY