Re: More Performance Questions

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: More Performance Questions
Дата
Msg-id 5504.1005156788@sss.pgh.pa.us
обсуждение исходный текст
Ответ на More Performance Questions  (Gordan Bobic <gordan@bobich.net>)
Список pgsql-general
Gordan Bobic <gordan@bobich.net> writes:
> And is the overhead of running multiple UNION queries greater than the
> overhead of doing a DISTINCT? I need to sort the records anyway, so the fact
> that DISTINCT does a SORT is a bonus in this case.

UNION implies DISTINCT, so you're going to get sort and uniq steps in
either case.  What this is really going to boil down to is how the
restriction and join steps are done, and you haven't given enough info
to speculate about that.  Try some experimentation with EXPLAIN to see
what kinds of plans you get.

            regards, tom lane

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

Предыдущее
От: Javier Dussaillant
Дата:
Сообщение: Re: Old Template0 is annoying me!
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [pgadmin-hackers] Fwd: Re: Howto change column