Re: cost of CREATE VIEW ... AS SELECT DISTINCT

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: cost of CREATE VIEW ... AS SELECT DISTINCT
Дата
Msg-id 1112047463.22988.25.camel@state.g2switchworks.com
обсуждение исходный текст
Ответ на cost of CREATE VIEW ... AS SELECT DISTINCT  (T E Schmitz <mailreg@numerixtechnology.de>)
Ответы Re: cost of CREATE VIEW ... AS SELECT DISTINCT  (T E Schmitz <mailreg@numerixtechnology.de>)
Список 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 по дате отправления:

Предыдущее
От: T E Schmitz
Дата:
Сообщение: cost of CREATE VIEW ... AS SELECT DISTINCT
Следующее
От: T E Schmitz
Дата:
Сообщение: Re: cost of CREATE VIEW ... AS SELECT DISTINCT