Re: Auto-tuning a VIEW?

Поиск
Список
Период
Сортировка
От PFC
Тема Re: Auto-tuning a VIEW?
Дата
Msg-id op.s1smezd8cigqcu@peufeu.com
обсуждение исходный текст
Ответ на Auto-tuning a VIEW?  (Zoltan Boszormenyi <zboszor@dunaweb.hu>)
Ответы Re: Auto-tuning a VIEW?  (Zoltan Boszormenyi <zboszor@dunaweb.hu>)
Список pgsql-performance
> create view v1 (code,num) as
> select 'AAA',id from table1
> union
> select 'BBB',id from table2;

    As your rows are, by definition, distinct between each subquery, you
should use UNION ALL instead of UNION to save postgres the trouble of
hunting non-existing duplicates. This will save you a few sorts.

> select * from v1 where code||num = 'AAA2005000001';

    Why don't you use code='AAA' and num='2005000001' ?

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

Предыдущее
От: Zoltan Boszormenyi
Дата:
Сообщение: Auto-tuning a VIEW?
Следующее
От: Zoltan Boszormenyi
Дата:
Сообщение: Re: Auto-tuning a VIEW?