Re: cost of CREATE VIEW ... AS SELECT DISTINCT - Mailing list pgsql-sql

From Scott Marlowe
Subject Re: cost of CREATE VIEW ... AS SELECT DISTINCT
Date
Msg-id 1112047463.22988.25.camel@state.g2switchworks.com
Whole thread Raw
In response to cost of CREATE VIEW ... AS SELECT DISTINCT  (T E Schmitz <mailreg@numerixtechnology.de>)
Responses Re: cost of CREATE VIEW ... AS SELECT DISTINCT  (T E Schmitz <mailreg@numerixtechnology.de>)
List pgsql-sql
On Mon, 2005-03-28 at 15:43, T E Schmitz wrote:
> Hello,
> How expensive would it be to maintain the following VIEW:
> 
> CREATE VIEW origin AS SELECT DISTINCT origin FROM transaktion
> 
> if there is in index on transaktion.origin; the table transaktion has 
> thousands of records and there are only a few distinct origin?

The cost will only be encurred when running the view.  if you want
materialized views (which WOULD have maintenance costs) you'll have to
do a google search for postgresql materialized views and implement them
by hand, so to speak.

The cost of executing that view should be the same as the cost of
running the query by hand.


pgsql-sql by date:

Previous
From: T E Schmitz
Date:
Subject: cost of CREATE VIEW ... AS SELECT DISTINCT
Next
From: T E Schmitz
Date:
Subject: Re: cost of CREATE VIEW ... AS SELECT DISTINCT