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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joe Van Dyk <joe(at)tanga(dot)com>
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:14:05
Message-ID: 18828.1387239245@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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.

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Joe Van Dyk 2013-12-17 00:37:03 Re: Adding an additional join causes very different/slow query plan
Previous Message Joe Van Dyk 2013-12-16 21:59:35 Re: Adding an additional join causes very different/slow query plan