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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-novice by date

  From Date Subject
Next Message Andreas Kretschmer 2006-03-02 18:22:45 Re: Efficiency of Views
Previous Message George Weaver 2006-03-02 16:31:27 Re: pg_config --pgxs