Re: problem with huge joins

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: problem with huge joins
Дата
Msg-id 20031101004321.GD5475@svana.org
обсуждение исходный текст
Ответ на Re: problem with huge joins  (Kolus Maximiliano <Kolus.maximiliano@bcr.com.ar>)
Список pgsql-general
On Fri, Oct 31, 2003 at 01:17:45PM -0300, Kolus Maximiliano wrote:
> > > Total runtime: 317046.69 msec
>
> Total runtime: 216001.94 msec
>
>     A lot better! Thanks!
>
> > The hash indexes are a waste of time for this :-(
>
>     Which kind should I use?

My guess that for large joins it can be more useful to use indexes to
presort a table and use highly efficient merge joins instead. However, hash
indexes cannot be used to sort a table, only for lookups.

btrees are more highly optimised and can produce sorted output.

Give it a shot.

--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> "All that is needed for the forces of evil to triumph is for enough good
> men to do nothing." - Edmond Burke
> "The penalty good people pay for not being interested in politics is to be
> governed by people worse than themselves." - Plato

Вложения

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

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: slow query performance
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: 7.3.5 release (was: Re: SELECT with row>32k hangs over