Re: slow index lookup - Mailing list pgsql-performance

From Anj Adu
Subject Re: slow index lookup
Date
Msg-id AANLkTinfOpPuUB7jPIIkakJ1srW3gIR-Wjze-ejV35ke@mail.gmail.com
Whole thread Raw
In response to Re: slow index lookup  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-performance
Appears to have helped with the combination index. I'll need to
eliminate caching effects before making sure its the right choice.

Thanks for the suggestion.

On Tue, Jun 22, 2010 at 7:01 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Alvaro Herrera <alvherre@commandprompt.com> writes:
>> Excerpts from Anj Adu's message of mar jun 22 17:44:39 -0400 2010:
>>> This query seems unreasonable slow on a well-indexed table (13 million
>>> rows). Separate indexes are present on guardid_id , from_num and
>>> targetprt columns.
>
>> Maybe you need to vacuum or reindex?
>
> Rethinking the set of indexes is probably a more appropriate suggestion.
> Separate indexes aren't usefully combinable for a case like this --- in
> principle the thing could do a BitmapAnd, but the startup time would be
> pretty horrid, and the LIMIT 1 is discouraging it from trying that.
> If this is an important case to optimize then you need a 3-column index.
>
>                        regards, tom lane
>

pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: slow index lookup
Next
From: Jayadevan M
Date:
Subject: Re: Query about index usage