From: Tomas Vondra <tv@fuzzy.cz>
To: Katharina Koobs <katharina.koobs@uni-konstanz.de>
Cc: pgsql-performance@postgresql.org, "'Sebastian Vogt'" <sebastian.vogt@uni-konstanz.de>
Subject: Re: Increasing query time after updates
Date: Tue, 21 Jan 2014 11:57:51 +0100
Message-ID: <69c579d91f1c94a283be562e2ba4ffdb.squirrel@sq.gransy.com> (raw)
In-Reply-To: <000001cf1671$c5e023b0$51a06b10$@uni-konstanz.de>
References: <000001cf1671$c5e023b0$51a06b10$@uni-konstanz.de>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>
Hi,
On 21 Leden 2014, 7:26, Katharina Koobs wrote:
> Hi,
>
> We have a PostgreSQL DB, version 8.4 on a Suse Linux system.
> Every night a script runs with several updates and inserts. The query time
> at day increases after
> approximately 3 weeks from a few minutes to about an hour.
> After export, drop and import the DB the query time is again at a few
> minutes.
>
> We have tested vacuum full, vacuum analyze and reindex and get no
> improvement.
>
> Has anyone an idea why the queries are getting slower and slower?
The table/index bloat would be my first bet, but that should be fixed (or
at least improved) by the vacuum commands you've tested.
Sadly, the amount of info you provided is insufficient to determine the
cause - the best thing you can give us are explain plans of the query, one
when it's fast, one when it's slow.
If it's longer than a few lines, please post it to explain.depesz.com and
not here (the clients will reformat it, making it unreadable).
> Thank you so much for your help!
>
> The DB configuration:
>
> Virtual server, 7GB RAM, DB size = 16GB
>
> shared_buffers = 1024MB
> temp_buffers = 32MB
> work_mem = 8MB
> checkpoint_segments = 20
> effective_cache_size = 512MB
Any reason not to use higher value for effective_cache_size? You have 7GB
of RAM, 1GB of that is for shared buffers, so I'd say ~4GB would be a good
value here. Unlikely to be the cause of the issues you're seeing, though.
Tomas
--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
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: tv@fuzzy.cz, katharina.koobs@uni-konstanz.de, sebastian.vogt@uni-konstanz.de
Subject: Re: Increasing query time after updates
In-Reply-To: <69c579d91f1c94a283be562e2ba4ffdb.squirrel@sq.gransy.com>
* 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