From: Tom Lane <tgl@sss.pgh.pa.us>
To: Eric Schwarzenbach <subscriber@blackbrook.org>
Cc: pgsql-performance@postgresql.org
Subject: Re: view columns and performance
Date: Fri, 30 Jul 2010 11:11:02 -0400
Message-ID: <6514.1280502662@sss.pgh.pa.us> (raw)
In-Reply-To: <4C52E7E4.4020204@blackbrook.org>
References: <4C52E7E4.4020204@blackbrook.org>
Eric Schwarzenbach <subscriber@blackbrook.org> writes:
> I'm wondering whether columns, in the select list of a view that is used
> in a join, which are not used either as join criteria or in the select
> list of the overall query, effect the performance of the query.
If the view gets "flattened" into the calling query then unreferenced
columns will be optimized away, otherwise probably not. You haven't
given enough details about your intended view definition to be sure
whether it can be optimized, but if it's just a join it's fine.
regards, tom lane
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, subscriber@blackbrook.org
Subject: Re: view columns and performance
In-Reply-To: <6514.1280502662@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