From: Simon Riggs <simon@2ndquadrant.com>
To: Jone C <jonecster@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: slow growing table
Date: Tue, 07 Jun 2005 23:21:48 +0100
Message-ID: <1118182908.3844.1605.camel@localhost.localdomain> (raw)
In-Reply-To: <6556952605060609485c622403@mail.gmail.com>
References: <6556952605060609485c622403@mail.gmail.com>
On Mon, 2005-06-06 at 09:48 -0700, Jone C wrote:
> HI!
>
> I have a table that I use for about a month. As the month progresses,
> COPYs performed to this table get much much slower than they were at
> the beginning, for the same number of rows (about 100,000 and
> growing).
>
> I'm essentially doing a delete for a given day, then a COPY as a big
> transaction. This is done about 12 times a day.
>
> When the table is new it's very fast, towards the end of the month
> it's taking almost 10 times longer, yet I'm deleting and COPYing in
> the same amount of data. Other operations on this table slow down,
> too, that were fast before using the same criteria.
>
> I do a VACUUM ANALYZE after each delete / COPY process, I tried
> experimenting with CLUSTER but saw no real difference.
>
> this is psql 7.45 on Linux server, dedicated for this purpose. About 5
> indexes, no FKs on this table.
>
> happy to provide any other info might need, suggestions appreciated
>
Search the archives for details within 4 months of a similar issue.
The consensus was that this was because the indexes had become too big
to fit in memory, hence the leap in response times.
The workaround is to split the table into smaller pieces.
Best Regards, Simon Riggs
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-performance@postgresql.org
Cc: simon@2ndquadrant.com, jonecster@gmail.com
Subject: Re: slow growing table
In-Reply-To: <1118182908.3844.1605.camel@localhost.localdomain>
* 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