Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W5Z1s-0006aW-RK for pgsql-performance@arkaria.postgresql.org; Tue, 21 Jan 2014 10:58:01 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1W5Z1r-000688-Ij for pgsql-performance@arkaria.postgresql.org; Tue, 21 Jan 2014 10:57:59 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W5Z1q-000682-Px for pgsql-performance@postgresql.org; Tue, 21 Jan 2014 10:57:58 +0000 Received: from mail.gransy.com ([2001:1528:137::f1]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W5Z1n-00044d-4Z for pgsql-performance@postgresql.org; Tue, 21 Jan 2014 10:57:57 +0000 Received: from antispam.gransy.com (antispam.gransy.com [77.78.104.124]) by mail.gransy.com (Postfix) with ESMTP id 4AC8D508F59 for ; Tue, 21 Jan 2014 11:57:54 +0100 (CET) X-Virus-Scanned: G-Hosting.cz + Station.cz + Klenot.cz + Subreg.cz amavisd-new at antispam.gransy.com Received: from mail.gransy.com ([82.208.29.194]) by antispam.gransy.com (antispam.gransy.com [77.78.104.124]) (amavisd-new, port 10024) with ESMTP id e0Dx7nShdvig for ; Tue, 21 Jan 2014 11:58:00 +0100 (CET) Received: from sq.gransy.com (elizabeth.gransy.com [89.187.132.199]) (Authenticated sender: tv@fuzzy.cz) by mail.gransy.com (Postfix) with ESMTPA id 2070A508F58; Tue, 21 Jan 2014 11:57:53 +0100 (CET) Received: from 212.47.19.46 (SquirrelMail authenticated user tv@fuzzy.cz) by sq.gransy.com with HTTP; Tue, 21 Jan 2014 11:57:51 +0100 Message-ID: <69c579d91f1c94a283be562e2ba4ffdb.squirrel@sq.gransy.com> In-Reply-To: <000001cf1671$c5e023b0$51a06b10$@uni-konstanz.de> References: <000001cf1671$c5e023b0$51a06b10$@uni-konstanz.de> Date: Tue, 21 Jan 2014 11:57:51 +0100 Subject: Re: Increasing query time after updates From: "Tomas Vondra" To: "Katharina Koobs" Cc: pgsql-performance@postgresql.org, "'Sebastian Vogt'" User-Agent: SquirrelMail/1.4.22 MIME-Version: 1.0 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org 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