Re: Increasing GROUP BY CHAR columns speed

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: Increasing GROUP BY CHAR columns speed
Дата
Msg-id dcc563d10811281024l4cc3a063r4f17ba8337b1ee36@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Increasing GROUP BY CHAR columns speed  ("Andrus" <kobruleht2@hot.ee>)
Ответы Re: Increasing GROUP BY CHAR columns speed  (Scott Carey <scott@richrelevance.com>)
Список pgsql-performance
On Fri, Nov 28, 2008 at 10:58 AM, Andrus <kobruleht2@hot.ee> wrote:
>
> SET work_mem = 2097151  (this is max allowed value) or SET work_mem = 97151
> decreases query time from 12 seconds to 9 seconds.

Setting work_mem so high that it allocates memory that isn't there
WILL slow down your queries, because the OS will then wind up swapping
out one part of the swap to make room for another part.  There are
values between 100M and 2G.  Run it with increasing work_mem from 100
to 500 or so Meg and see if that helps.  Keep an eye on vmstat 1 or
something to see if your machine starts swapping out while running the
query.  If it does you've overallocated memory and things will start
to slow down a LOT.

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

Предыдущее
От: "Andrus"
Дата:
Сообщение: Re: Increasing GROUP BY CHAR columns speed
Следующее
От: Scott Carey
Дата:
Сообщение: Re: Increasing GROUP BY CHAR columns speed