Re: Union within View vs.Union of Views - Mailing list pgsql-performance

From Jeff Larsen
Subject Re: Union within View vs.Union of Views
Date
Msg-id d1f9b6f00711031857s2972e92dgcedb209233f2485a@mail.gmail.com
Whole thread Raw
In response to Re: Union within View vs.Union of Views  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-performance
[[ 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

pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: "MixedCase sensitive quoted" names
Next
From: "Jeff Larsen"
Date:
Subject: Re: Union within View vs.Union of Views