Re: queries with lots of UNIONed relations

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: queries with lots of UNIONed relations
Дата
Msg-id 4879.1294949144@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: queries with lots of UNIONed relations  (Jon Nelson <jnelson+pgsql@jamponi.net>)
Ответы Re: queries with lots of UNIONed relations  (Jon Nelson <jnelson+pgsql@jamponi.net>)
Список pgsql-performance
Jon Nelson <jnelson+pgsql@jamponi.net> writes:
> Your comment regarding "each individual de-duplication looked like it
> would fit in work_mem" doesn't really make sense, exactly. Maybe I'm
> misunderstanding you.

Yeah.  What I was suggesting was to NOT add the DISTINCT's, but instead
raise work_mem high enough so you get just one HashAggregation step at
the top level.  (Although I think this only works in 8.4 and up.)
That should be faster than two levels of de-duplication.

            regards, tom lane

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

Предыдущее
От: Jon Nelson
Дата:
Сообщение: Re: queries with lots of UNIONed relations
Следующее
От: Jon Nelson
Дата:
Сообщение: Re: queries with lots of UNIONed relations