From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael L. Hostbaek <mich@freebsdcluster.org>
Cc: pgsql-sql@postgresql.org
Subject: Re: postgresql multiple insert slow
Date: Sat, 21 Feb 2004 11:03:45 -0500
Message-ID: <11942.1077379425@sss.pgh.pa.us> (raw)
In-Reply-To: <20040219163238.GD10913@mich2.itxmarket.com>
References: <20040219163238.GD10913@mich2.itxmarket.com>
"Michael L. Hostbaek" <mich@freebsdcluster.org> writes:
> I runs fine - and I get no errors - but it takes almost 25 minutes to
> complete.. I tried running the script while just grabbing the rows from
> the oracle database and writing to a text file - and then it only takes
> a couple of minutes .. So it must be the INSERT command that chokes - is
> there a better way to do it ?
You probably want to add BEGIN/COMMIT operations around the loop. See
the documentation's tips on bulk data loading:
http://www.postgresql.org/docs/7.4/static/populate.html
regards, tom lane
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, mich@freebsdcluster.org
Subject: Re: postgresql multiple insert slow
In-Reply-To: <11942.1077379425@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