Re: very slow after a while... - Mailing list pgsql-general

From Richard Huxton
Subject Re: very slow after a while...
Date
Msg-id 4253A947.9090300@archonet.com
Whole thread Raw
In response to very slow after a while...  ("Costin Manda" <siderite@madnet.ro>)
Responses Re: very slow after a while...  ("Costin Manda" <siderite@madnet.ro>)
List 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

pgsql-general by date:

Previous
From: "Costin Manda"
Date:
Subject: very slow after a while...
Next
From: "Dave Page"
Date:
Subject: 8.0.2 Beta 1 for Windows available