[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-general
Subject:    [GENERAL] Copy faster with sorted data?
From:       Denis Gasparin <denis () edistar ! com>
Date:       2004-03-22 14:30:42
Message-ID: 405EF892.2020707 () edistar ! com
[Download RAW message or body]

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

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic