Re: Any way to optimize GROUP BY queries?

Поиск
Список
Период
Сортировка
От Jim C. Nasby
Тема Re: Any way to optimize GROUP BY queries?
Дата
Msg-id 20051220194710.GJ28771@pervasive.com
обсуждение исходный текст
Ответ на Re: Any way to optimize GROUP BY queries?  (Greg Stark <gsstark@mit.edu>)
Ответы Re: Any way to optimize GROUP BY queries?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-performance
On Mon, Dec 19, 2005 at 03:47:35PM -0500, Greg Stark wrote:
> Increase your work_mem (or sort_mem in older postgres versions), you can do
> this for the server as a whole or just for this one session and set it back
> after this one query. You can increase it up until it starts causing swapping
> at which point it would be counter productive.

Just remember that work_memory is per-operation, so it's easy to push
the box into swapping if the workload increases. You didn't say how much
memory you have, but I'd be careful if work_memory * max_connections
gets very much larger than your total memory.
--
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461

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

Предыдущее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: PostgreSQL and Ultrasparc T1
Следующее
От: "Anjan Dave"
Дата:
Сообщение: Re: High context switches occurring