pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Li Jin <ljin@tripadvisor.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Performance penalty when using WITH
Date: Fri, 29 Jul 2011 13:40:27 -0400
Message-ID: <28960.1311961227@sss.pgh.pa.us> (raw)
In-Reply-To: <339959BC-3A27-4269-8A3E-4C157EBABB86@tripadvisor.com>
References: <339959BC-3A27-4269-8A3E-4C157EBABB86@tripadvisor.com>

Li Jin <ljin@tripadvisor.com> writes:
> Anyone knows why the planner is doing this?

WITH is an optimization fence.  This is intentional and documented.

			regards, tom lane



view thread (10+ messages)  latest in thread

Message-ID: <28960.1311961227@sss.pgh.pa.us>
Permalink:  ../28960.1311961227@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/28960.1311961227@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, ljin@tripadvisor.com
  Subject: Re: Performance penalty when using WITH
  In-Reply-To: <28960.1311961227@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