Re: Problem with planner choosing nested loop - Mailing list pgsql-general

From Scott Marlowe
Subject Re: Problem with planner choosing nested loop
Date
Msg-id dcc563d10804021221i1c3149f8q8593b9f440274614@mail.gmail.com
Whole thread Raw
In response to Re: Problem with planner choosing nested loop  (Harald Fuchs <hari.fuchs@googlemail.com>)
List pgsql-general
On Wed, Apr 2, 2008 at 1:06 PM, Harald Fuchs <hari.fuchs@googlemail.com> wrote:
> In article <a55915760804021107h4410dd93m33a6f94e28a83a2b@mail.gmail.com>,
>
> "Rodrigo E. De León Plicet" <rdeleonp@gmail.com> writes:
>
>  > On Wed, Apr 2, 2008 at 12:36 PM, Alex Solovey <a.solovey@gmail.com> wrote:
>  >> ... I have no idea how it could be fixed.
>
>  > - CREATE INDEX xifoo ON foo(bar_id);
>  > - ANALYZE;
>  > - Retry.
>
>  A compound index
>   CREATE INDEX xifoo2 ON foo (foo_a, bar_id)
>  might be more worthwhile.

And, if you're only interested in certain values of foo_a or bar_id
then partial indexes might be helpful but still cheap enough to
maintain in a large table.

pgsql-general by date:

Previous
From: "Richard Broersma"
Date:
Subject: Re: (FAQ?) JOIN condition - 'WHERE NULL = NULL'
Next
From: Andrew Sullivan
Date:
Subject: Re: (FAQ?) JOIN condition - 'WHERE NULL = NULL'