Re: seqscan on UNION'ed views

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: seqscan on UNION'ed views
Дата
Msg-id 17937.1361974878@sss.pgh.pa.us
обсуждение исходный текст
Ответ на seqscan on UNION'ed views  (Dmitry Karasik <dmitry@karasik.eu.org>)
Список pgsql-performance
Dmitry Karasik <dmitry@karasik.eu.org> writes:
> I need to have a sort of a time machine, where select statements on tables
> could be easily replaced to select statements on tables as they were some time in the past,
> including all related table. To do so, I used views (see in the script) that UNION
> both current and archive tables and filter them by a timestamp.

If you use UNION ALL instead of UNION, you should get better results
(as well as inherently cheaper queries, since no duplicate-elimination
step will be needed).

            regards, tom lane


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

Предыдущее
От: Andre
Дата:
Сообщение: Re: Server stalls, all CPU 100% system time
Следующее
От: Matt Daw
Дата:
Сообщение: Re: Estimation question...