Re: INSERT performace.

From: hubert depesz lubaczewski <depesz(at)depesz(dot)pl>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: INSERT performace.
Date: 2002-01-27 08:17:04
Message-ID: 20020127091703.A16784@depesz.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Sat, Jan 26, 2002 at 08:10:19PM -0600, Marc Mitchell wrote:
> 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.

depesz

--
hubert depesz lubaczewski http://www.depesz.pl/
------------------------------------------------------------------------
... vows are spoken to be broken ... [enjoy the silence]
... words are meaningless and forgettable ... [depeche mode]

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Sean Chittenden 2002-01-27 19:31:40 Re: INSERT performace.
Previous Message Chris Dircks 2002-01-27 06:55:07 data recovery question