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

Efficiency of Views

From: "Matt Helm" <code(dot)name(dot)eric(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Efficiency of Views
Date: 2006-03-02 17:57:40
Message-ID: e2ede3fa0603020957r1743bf8ao93b6dd067cf1be0f@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-novice
I have a table (call it T1) made up of a join from two other tables
and a few calculated columns.

Currently, T1 gets refreshed by manually calling a function that does
the select on the join and then loops through each row doing an
update / insert as needed.

Obviously it would be nice to put this in a view so that I don't
have to worry about someone forgetting to call the refresh function.

My question (probably a common one):

When I select a single row from the view using WHERE will
the view build the calculated columns for every row regardless?

Thanks,
Matt

Responses

pgsql-novice by date

Next:From: Andreas KretschmerDate: 2006-03-02 18:22:45
Subject: Re: Efficiency of Views
Previous:From: George WeaverDate: 2006-03-02 16:31:27
Subject: Re: pg_config --pgxs

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