pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Joe Van Dyk <joe@tanga.com>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: Adding an additional join causes very different/slow query plan
Date: Mon, 16 Dec 2013 19:14:05 -0500
Message-ID: <18828.1387239245@sss.pgh.pa.us> (raw)
In-Reply-To: <CACfv+p+B56xF-8wbPM+aaY8reZbdkcjOanrz1qYZotnKmTo=ig@mail.gmail.com>
References: <CACfv+pJ-NCBHLiHmeiCg_J5eunSavhQCDERRm4ryS8iHrzEdbQ@mail.gmail.com>
	<CACfv+p+B56xF-8wbPM+aaY8reZbdkcjOanrz1qYZotnKmTo=ig@mail.gmail.com>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>

Joe Van Dyk <joe@tanga.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


-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance



view thread (5+ messages)  latest in thread

Message-ID: <18828.1387239245@sss.pgh.pa.us>
Permalink:  ../18828.1387239245@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/18828.1387239245@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, joe@tanga.com
  Subject: Re: Adding an additional join causes very different/slow query plan
  In-Reply-To: <18828.1387239245@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox