Copy faster with sorted data?

From: Denis Gasparin <denis(at)edistar(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Copy faster with sorted data?
Date: 2004-03-22 14:30:42
Message-ID: 405EF892.2020707@edistar.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2004-03-22 15:38:08 Re: unsigned types, binary op. and cast pb
Previous Message Pierre Didelon 2004-03-22 13:05:22 Re: unsigned types, binary op. and cast pb