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

Under the hood of views

From: David Kerr <dmk(at)mr-paradox(dot)net>
To: pgsql-performance(at)postgresql(dot)org
Subject: Under the hood of views
Date: 2009-08-13 16:07:48
Message-ID: 20090813160748.GB88642@mr-paradox.net (view raw or flat)
Thread:
Lists: pgsql-performance
 developer came by and asked me an interesting question.

If he has a view with 20 columns in it, and he selects a specific column from the view
in his query. Does the engine when accessing the view return all columns? or is it 
smart enough to know to just retrive the one?

example:

create view test as
select a,b,c,d,e,f,g from testtable;


select a from test;

(does the engine retrieve b-g?)

Thanks

Dave

Responses

pgsql-performance by date

Next:From: Richard HuxtonDate: 2009-08-13 16:28:01
Subject: Re: Under the hood of views
Previous:From: Matthew WakelingDate: 2009-08-13 14:36:15
Subject: Re: How to run this in reasonable time:

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