pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jose Vicente Nunez Z <josevnz@newbreak.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Inserting 26 million rows takes 8 hours, how to improve those times?
Date: Tue, 16 Sep 2003 10:44:36 -0400
Message-ID: <17211.1063723476@sss.pgh.pa.us> (raw)
In-Reply-To: <1063717273.5407.16.camel@linux0037>
References: <1063717273.5407.16.camel@linux0037>

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



view thread (5+ messages)  latest in thread

Message-ID: <17211.1063723476@sss.pgh.pa.us>
Permalink:  ../17211.1063723476@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/17211.1063723476@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, josevnz@newbreak.com
  Subject: Re: Inserting 26 million rows takes 8 hours, how to improve those times?
  In-Reply-To: <17211.1063723476@sss.pgh.pa.us>
  References: <1063717273.5407.16.camel@linux0037> <17211.1063723476@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox