pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeff Larsen <jlar310@gmail.com>
To: pgsql-performance@postgresql.org
Subject: Re: Union within View vs.Union of Views
Date: Sat, 3 Nov 2007 20:57:21 -0500
Message-ID: <d1f9b6f00711031857s2972e92dgcedb209233f2485a@mail.gmail.com> (raw)
In-Reply-To: <3248.1194140315@sss.pgh.pa.us>
References: <d1f9b6f00711031322h1d2858d4xbfff4852941d405b@mail.gmail.com>
	<472CFE4B.5060606@enterprisedb.com>
	<3248.1194140315@sss.pgh.pa.us>

[[ Oops, still not used to gmail. Accidentally posted this straight to
Tom and not the list]]

> There are a bunch of special cases where it can't do that, though.
> Look into src/backend/optimizer/path/allpaths.c, particularly
> subquery_is_pushdown_safe:

My case probably fits the 'special case' description. Not all the
columns in each subquery matched up, so there were NULL::text
placeholders in some spots in the SELECT. In the case where
performance got bad, one of those columns was included in the
application's WHERE clause.

That's a good enough explanation for me. I'll spare you the gory
details of my tables, unless a developer wants to have a look at it
off-list.

Jeff



view thread (6+ messages)  latest in thread

Message-ID: <d1f9b6f00711031857s2972e92dgcedb209233f2485a@mail.gmail.com>
Permalink:  ../d1f9b6f00711031857s2972e92dgcedb209233f2485a@mail.gmail.com/
Also on:    postgresql.org/message-id/d1f9b6f00711031857s2972e92dgcedb209233f2485a@mail.gmail.com

 · 

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: jlar310@gmail.com
  Subject: Re: Union within View vs.Union of Views
  In-Reply-To: <d1f9b6f00711031857s2972e92dgcedb209233f2485a@mail.gmail.com>

* 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