Re: very slow after a while...

From: Richard Huxton <dev(at)archonet(dot)com>
To: Costin Manda <siderite(at)madnet(dot)ro>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: very slow after a while...
Date: 2005-04-06 09:17:59
Message-ID: 4253A947.9090300@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Costin Manda wrote:

> The thing is the after I updated to 8.0.1 and also (separate ocasion)
> after I recreated the database one day, the script runs instantly with
> thousands and hundreds of lines inserted and updated per second. However,
> after a while the whole process slows down significantly, eraching the
> point of one insert or update per second or per four!!! seconds.
>
> I have tried vacuuming full, reindexing, deleting the table and recreating
> it, I tried changing values in postgres conf and in the linux kernel.
> Nothing works except re initialising the whole database directory.

Some more info please:
1. This is this one INSERT statement per transaction, yes? If that
fails, you do an UPDATE
2. Are there any foreign-keys the insert will be checking?
3. What indexes are there on the main table/foreign-key-related tables?

Whatever the answers to these questions, perhaps look into loading your
data into a temporary table, inserting any rows without matching primary
keys and then deleting those and updating what's left.

--
Richard Huxton
Archonet Ltd

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dave Page 2005-04-06 10:29:36 8.0.2 Beta 1 for Windows available
Previous Message Costin Manda 2005-04-06 08:27:23 very slow after a while...