Skip site navigation (1) Skip section navigation (2)

Re: view columns and performance

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Eric Schwarzenbach <subscriber(at)blackbrook(dot)org>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: view columns and performance
Date: 2010-07-30 15:11:02
Message-ID: 6514.1280502662@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-performance
Eric Schwarzenbach <subscriber(at)blackbrook(dot)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

In response to

pgsql-performance by date

Next:From: Karl DenningerDate: 2010-07-30 15:14:43
Subject: Re: Testing Sandforce SSD
Previous:From: Yeb HavingaDate: 2010-07-30 15:01:43
Subject: Re: Testing Sandforce SSD

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group