Re: in-memory sorting

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: in-memory sorting
Дата
Msg-id AANLkTin3oDOHshn29=YgiS9BYHFD2Jt23WPwociKg8qT@mail.gmail.com
обсуждение исходный текст
Ответ на Re: in-memory sorting  (Samuel Gendler <sgendler@ideasculptor.com>)
Список pgsql-performance
Hello
>>
>> I'm not understanding why it is sorting on disk if it would fit within
>> a work_mem segment - by a fairly wide margin.  Is there something else
>> I can do to get that sort to happen in memory?
>>

Planner working with estimations. So there is some probability so
planner expected a larger result set and used a external sort.
Probably quick sort takes more memory too. Your statistic are probably
out of range - system expecting 0.5 mil rec and get 2 mil rec.

Regards

Pavel

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

Предыдущее
От: Samuel Gendler
Дата:
Сообщение: Re: in-memory sorting
Следующее
От: Samuel Gendler
Дата:
Сообщение: yet another q