Re: view columns and performance - Mailing list pgsql-performance

From Tom Lane
Subject Re: view columns and performance
Date
Msg-id 6514.1280502662@sss.pgh.pa.us
Whole thread Raw
In response to view columns and performance  (Eric Schwarzenbach <subscriber@blackbrook.org>)
List pgsql-performance
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

pgsql-performance by date:

Previous
From: Eric Schwarzenbach
Date:
Subject: view columns and performance
Next
From: Karl Denninger
Date:
Subject: Re: Testing Sandforce SSD