Tuning Question sort_mem vs pgsql_tmp

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Tuning Question sort_mem vs pgsql_tmp
Дата
Msg-id 87u1fk6low.fsf@stark.dyndns.tv
обсуждение исходный текст
Ответы Re: Tuning Question sort_mem vs pgsql_tmp
Список pgsql-general
Is pgsql_tmp.* used for anything other than sorts? The only thing I see in a
quick review of the sources is hash joins but that shouldn't be relevant.

I've raised sort_mem to 49152 (1k blocks as I understand it) Yet pgsql_tmp
files are still being created. They range in size from 7M up to 34M. I don't
understand why posgres would need a 34M temporary sort space if it has 48M of
sort memory available. The results weren't much different before I raised
sort_mem.

The query being run is of the form INSERT INTO () (SELECT DISTINCT ON...)
Does the insert have the accumulate temporary data somewhere?

Does sort_mem have to be larger than the corresponding pgsql_tmp area that
would be used if postgres runs out of sort_mem?

--
greg

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Q: explain on delete
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Tuning Question sort_mem vs pgsql_tmp