Copy faster with sorted data?

Поиск
Список
Период
Сортировка
От Denis Gasparin
Тема Copy faster with sorted data?
Дата
Msg-id 405EF892.2020707@edistar.com
обсуждение исходный текст
Список pgsql-general
Hi to all.

I'm loading 20 millions of integers in a simple table like this:

create table test(
    code integer not null primary key
);

I noticed that the time to load the integers changes if the data is
sorted before giving the copy command.

\copy test from 'codes.txt' took about 15 minutes less when codes.txt
was sorted.

I think the cause of this behaviour is index creation. Could it be?

Thank you,
Denis

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

Предыдущее
От: Pierre Didelon
Дата:
Сообщение: Re: unsigned types, binary op. and cast pb
Следующее
От: "Ed L."
Дата:
Сообщение: Slow query not using index