Re: cannot use multicolumn index - Mailing list pgsql-performance

From Scott Marlowe
Subject Re: cannot use multicolumn index
Date
Msg-id CAOR=d=2dPOryEJ4di129RwhGR1pC3eCxrhUnboML9t23+Xv+Sw@mail.gmail.com
Whole thread Raw
In response to cannot use multicolumn index  (MirrorX <mirrorx@gmail.com>)
List pgsql-performance
On Wed, Sep 14, 2011 at 6:50 AM, MirrorX <mirrorx@gmail.com> wrote:
> any ideas on how i should write to query to use this index? thx in advance

You can do something like:

set enable_seqscan=off;
explain select yourqueryhere;

and see if the plan it comes up with is any better.  Use explain
analyze to see how long it really takes.  Basically if the index isn't
selective enough a seq scan will be a win, especially in pgsql where
it has to hit the table anyway, whether it uses the index or not.

pgsql-performance by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: cannot use multicolumn index
Next
From: Jeff Janes
Date:
Subject: Re: How to make hash indexes fast