Re: Adding an additional join causes very different/slow query plan

From: Joe Van Dyk <joe(at)tanga(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Adding an additional join causes very different/slow query plan
Date: 2013-12-17 00:37:03
Message-ID: CACfv+pKNEmbQyJPCqRGsVmc_HvRGAi3d_Ge893N8qbX+ymhodA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Mon, Dec 16, 2013 at 4:14 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Joe Van Dyk <joe(at)tanga(dot)com> writes:
> > Hm, setting set join_collapse_limit = 9 seemed to fix the problem. Is
> that
> > my best/only option?
>
> Yup, that's what I was just about to suggest. You might want to use
> 10 or 12 in case some of your queries are a bit more complex than
> this one --- but don't go overboard, or you may find yourself with
> unreasonable planning time.
>

Is there a way to measure the planning time? It's not reported in 'explain
analyze' or 'explain analyze verbose', right?

Joe

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Stephen Frost 2013-12-17 14:01:28 Re: Adding an additional join causes very different/slow query plan
Previous Message Tom Lane 2013-12-17 00:14:05 Re: Adding an additional join causes very different/slow query plan