pg.ddx.io  pgsql-patches@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Martijn van Oosterhout <kleptog@svana.org>
To: Andrew Gierth <andrew@tao11.riddles.org.uk>
Cc: pgsql-hackers@postgresql.org
Subject: Re: WITH RECUSIVE patches 0723
Date: Tue, 29 Jul 2008 00:24:46 +0200
Message-ID: <20080728222446.GC24856@svana.org> (raw)
In-Reply-To: <87myk1rg4z.fsf@news-spur.riddles.org.uk>
References: <20080725001513.GF16438@fetter.org>
	<20080725.092652.105178884.t-ishii@sraoss.co.jp>
	<87r69gs967.fsf@news-spur.riddles.org.uk>
	<20080728.162925.23020498.t-ishii@sraoss.co.jp>
	<19882.1217256991@sss.pgh.pa.us>
	<87myk1rg4z.fsf@news-spur.riddles.org.uk>

On Mon, Jul 28, 2008 at 07:57:16PM +0100, Andrew Gierth wrote:
> Which will be a serious pessimization in many common cases if you do
> it all the time. Googling for examples of non-recursive WITH queries
> shows that it is very widely used for clarity or convenience, in
> contexts where you _don't_ want materialization.

Since the problem is using the result of a WITH clause more than once,
would it be sufficient to simply detect that case and bail? You don't
want materialisation is most cases, there's just a few where it is
needed.

Have a nice day,
-- 
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while 
> boarding. Thank you for flying nlogn airlines.

Attachments:

  signature.asc (application/pgp-signature, 188B) download

view thread (39+ messages)  latest in thread

Message-ID: <20080728222446.GC24856@svana.org>
Permalink:  ../20080728222446.GC24856@svana.org/
Also on:    postgresql.org/message-id/20080728222446.GC24856@svana.org

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-patches@postgresql.org
  Cc: kleptog@svana.org, andrew@tao11.riddles.org.uk, pgsql-hackers@postgresql.org
  Subject: Re: WITH RECUSIVE patches 0723
  In-Reply-To: <20080728222446.GC24856@svana.org>
  References: <20080725001513.GF16438@fetter.org> <20080725.092652.105178884.t-ishii@sraoss.co.jp> <87r69gs967.fsf@news-spur.riddles.org.uk> <20080728.162925.23020498.t-ishii@sraoss.co.jp> <19882.1217256991@sss.pgh.pa.us> <87myk1rg4z.fsf@news-spur.riddles.org.uk> <20080728222446.GC24856@svana.org>

* 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