Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Tl3et-0002wG-PF for pgsql-performance@arkaria.postgresql.org; Tue, 18 Dec 2012 20:20:59 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1Tl3et-000159-2h for pgsql-performance@arkaria.postgresql.org; Tue, 18 Dec 2012 20:20:59 +0000 Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Tl3er-000141-IC for pgsql-performance@postgresql.org; Tue, 18 Dec 2012 20:20:57 +0000 Received: from mailout-us.gmx.com ([74.208.5.67]) by makus.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1Tl3eq-0007sA-IC for pgsql-performance@postgresql.org; Tue, 18 Dec 2012 20:20:56 +0000 Received: (qmail 15337 invoked by uid 0); 18 Dec 2012 20:09:57 -0000 Received: from 76.255.19.161 by rms-us011 with HTTP Cc: pgsql-performance@postgresql.org Content-Type: text/plain; charset="utf-8" Date: Tue, 18 Dec 2012 15:09:54 -0500 From: "Kevin Grittner" Message-ID: <20121218200955.14720@gmx.com> MIME-Version: 1.0 Subject: Re: Slow queries after vacuum analyze To: "Ghislain ROUVIGNAC" X-Authenticated: #138763884 X-Flags: 0001 X-Mailer: GMX.com Web Mailer x-registered: 0 Content-Transfer-Encoding: 8bit X-GMX-UID: xKiicKRk3zOlOQ09LnwhPc1+IGRvbwCN 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 Ghislain ROUVIGNAC wrote: > Memory : In use 4 Go, Free 15Go, cache 5 Go. If the active portion of your database is actually small enough that it fits in the OS cache, I recommend: seq_page_cost = 0.1 random_page_cost = 0.1 cpu_tuple_cost = 0.05 > I plan to increase various parameters as follow: > shared_buffers = 512MB > temp_buffers = 16MB > work_mem = 32MB > wal_buffers = 16MB > checkpoint_segments = 32 > effective_cache_size = 2560MB > default_statistics_target = 500 > autovacuum_vacuum_scale_factor = 0.05 > autovacuum_analyze_scale_factor = 0.025 You could probably go a little higher on work_mem and effective_cache_size. I would leave default_statistics_target alone unless you see a lot of estimates which are off by more than an order of magnitude. Even then, it is often better to set a higher value for a few individual columns than for everything. Remember that this setting has no effect until you reload the configuration and then VACUUM. -Kevin -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance