From: Sean Chittenden <sean@chittenden.org>
To: hubert depesz lubaczewski <depesz@depesz.pl>
Cc: pgsql-admin@postgresql.org
Subject: Re: INSERT performace.
Date: Sun, 27 Jan 2002 11:31:40 -0800
Message-ID: <20020127113140.A64594@ninja1.internal> (raw)
In-Reply-To: <20020127091703.A16784@depesz.pl>
References: <00a001c1a6d7$c833c520$7401a8c0@Home>
<20020127091703.A16784@depesz.pl>
> > We have a fresh database and have begun to observe performance
> > degradation for INSERTs as a table went from empty to 100,000-ish
> > rows. Initial INSERTs were sub second while after 30k rows, they
> > were 1-3 seconds.
>
> we just hit this problem when moving old database to new one (new
> schema). we had to insert approx. 1.5 million rows, and from
> initial 0.02s/insert after several thousands of inserts it came to
> 20 seconds per insert. what we did was removing foreign keys from
> table which we made inserts to. it helped. we manage to put 300k
> records in ca. 2-3 hours.
If possible, use the COPY command. We did 90K rows in about 40sec
using this puppy on a Solaris U5 (took over 130sec for MySQL on the
same box in case the performance geeks in the crowd are interested).
http://www.postgresql.org/idocs/index.php?sql-copy.html
-sc
--
Sean Chittenden
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: sean@chittenden.org, depesz@depesz.pl
Subject: Re: INSERT performace.
In-Reply-To: <20020127113140.A64594@ninja1.internal>
References: <00a001c1a6d7$c833c520$7401a8c0@Home> <20020127091703.A16784@depesz.pl> <20020127113140.A64594@ninja1.internal>
* 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