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

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: cost of CREATE VIEW ... AS SELECT DISTINCT
Дата
Msg-id 20050329150418.GA32031@wolff.to
обсуждение исходный текст
Ответ на Re: cost of CREATE VIEW ... AS SELECT DISTINCT  (T E Schmitz <mailreg@numerixtechnology.de>)
Ответы Re: cost of CREATE VIEW ... AS SELECT DISTINCT
Список pgsql-sql
On Tue, Mar 29, 2005 at 14:21:15 +0100, T E Schmitz <mailreg@numerixtechnology.de> wrote:
> 
> As far as I can see (via EXPLAIN), both DISTINCT and GROUP BY will lead 
> to a sequentail scan. Is that correct?

If you need to read the whole table yes. However if you join the view
to something else that might not be necessary.
> If that's the case, I should come up with a different concept to obtain 
> a list of ORIGINs.

That may be a good idea, especially if there are lots of rows for each
origin value.


В списке pgsql-sql по дате отправления:

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