Re: Inserting 26 million rows takes 8 hours, how to improve those times? - Mailing list pgsql-admin

From Tom Lane
Subject Re: Inserting 26 million rows takes 8 hours, how to improve those times?
Date
Msg-id 17211.1063723476@sss.pgh.pa.us
Whole thread Raw
In response to Inserting 26 million rows takes 8 hours, how to improve those times?  (Jose Vicente Nunez Z <josevnz@newbreak.com>)
Responses Re: Inserting 26 million rows takes 8 hours, how to  (Jose Vicente Nunez Z <josevnz@newbreak.com>)
List pgsql-admin
Jose Vicente Nunez Z <josevnz@newbreak.com> writes:
> For that i'm using the PostgreSQL copy tool, but the problem is that is
> taking almost 9 hours to load the data:

Hmm, 889 rows/second doesn't sound that bad, considering that you've
given us no data about the hardware you're running on.  In particular,
what's your disk setup?

But at any rate, the only bottlenecks I could think of for a COPY
command are:

1. Data conversion.  This would depend on the column datatypes of the
table, which you didn't tell us.

2. Index updating.  This would depend on the indexes on the table,
which you didn't tell us.

3. Foreign-key constraint checking.  This would depend on the foreign
keys the table has, which you didn't tell us.

In short ... you'd better provide a lot more detail if you want
useful commentary.

> I apologize if this not the proper place to post this questions.

pgsql-performance would be more appropriate, probably.

            regards, tom lane

pgsql-admin by date:

Previous
From: Thierry Missimilly
Date:
Subject: Re: postgresql headers
Next
From: Jose Vicente Nunez Z
Date:
Subject: Re: Inserting 26 million rows takes 8 hours, how to