Re: Index creation time and distribution

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Index creation time and distribution
Дата
Msg-id 29529.1211462076@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Index creation time and distribution  ("Guillaume Smet" <guillaume.smet@gmail.com>)
Ответы Re: Index creation time and distribution
Re: Index creation time and distribution
Список pgsql-performance
"Guillaume Smet" <guillaume.smet@gmail.com> writes:
> I experienced this morning a performance problem when we imported a
> dump in a 8.1 database.
> The table is 5 millions rows large and when the dump creates an index
> on a specific text column called clazz it takes 27 minutes while on
> the other columns, it only takes a couple of seconds:
> The only weird thing about this column is that 4.7 millions of rows
> have the exact same value.

Do you have maintenance_work_mem set large enough that the index
creation sort is done in-memory?  8.1 depends on the platform's qsort
and a lot of them are kinda pessimal for input like this.

8.2 (which uses our own qsort) seems to perform better in a quick
test.

            regards, tom lane

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

Предыдущее
От: "Guillaume Smet"
Дата:
Сообщение: Index creation time and distribution
Следующее
От: "Guillaume Smet"
Дата:
Сообщение: Re: Index creation time and distribution