Re: is a special cost for external sort?

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема Re: is a special cost for external sort?
Дата
Msg-id CAMkU=1y4+ei780uVBWAnVNad_xAmi5viZBudVax6kzBk4-RVmQ@mail.gmail.com
обсуждение исходный текст
Ответ на is a special cost for external sort?  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
On Thu, Jul 18, 2013 at 9:14 AM, Pavel Stehule <pavel.stehule@gmail.com> wrote:
> Hello
>
> I found a slow query with large external sort. I expect, so external
> sort should be penalized. Is it?

It tries to, but it doesn't seem to be much good at it.  In
particular, I think it does a poor job of estimating the CPU cost of
an external sort relative to an in-memory sort of a slightly smaller
data set.  In my experience adding the single tuple that actually
pushes you over the work_mem limit costs about 3x in CPU.

It is one of those things I started looking into a few times, but
never got anywhere before getting distracted.

Cheers,

Jeff



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: [9.4 CF 1] Patches which desperately need code review
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Fatal error after starting postgres : sys identifiers must be different