Re: [HACKERS] qsort again (was Re: Strange Create Index behaviour)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] qsort again (was Re: Strange Create Index behaviour)
Дата
Msg-id 21152.1140049020@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: qsort again (was Re: Strange Create Index behaviour)  (Gary Doades <gpd@gpdnet.co.uk>)
Ответы Re: [HACKERS] qsort again (was Re: Strange Create Index behaviour)
Список pgsql-performance
Gary Doades <gpd@gpdnet.co.uk> writes:
> Ouch! That confirms my problem. I generated the random test case because
> it was easier than including the dump of my tables, but you can
> appreciate that tables 20 times the size are basically crippled when it
> comes to creating an index on them.

Actually... we only use qsort when we have a sorting problem that fits
within the allowed sort memory.  The external-sort logic doesn't go
through that code at all.  So all the analysis we just did on your test
case doesn't necessarily apply to sort problems that are too large for
the sort_mem setting.

The test case would be sorting 200000 index entries, which'd probably
occupy at least 24 bytes apiece of sort memory, so probably about 5 meg.
A problem 20 times that size would definitely not fit in the default
16MB maintenance_work_mem.  Were you using a large value of
maintenance_work_mem for your restore?

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: qsort again (was Re: Strange Create Index behaviour)
Следующее
От: Ron
Дата:
Сообщение: Re: qsort again (was Re: Strange Create Index