X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id DA639D1B9A6 for ; Mon, 7 Jun 2004 17:12:42 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 02480-05 for ; Mon, 7 Jun 2004 20:12:41 +0000 (GMT) Received: from bast.unixathome.org (bast.unixathome.org [66.11.174.150]) by svr1.postgresql.org (Postfix) with ESMTP id E8F32D1B8E8 for ; Mon, 7 Jun 2004 17:12:38 -0300 (ADT) Received: from wocker (wocker.unixathome.org [192.168.0.99]) by bast.unixathome.org (Postfix) with ESMTP id 784D93D34; Mon, 7 Jun 2004 16:12:40 -0400 (EDT) From: "Dan Langille" To: Rod Taylor Date: Mon, 07 Jun 2004 16:12:40 -0400 MIME-Version: 1.0 Subject: Re: seq scan woes Cc: Postgresql Performance Message-ID: <40C493F8.1181.48F37175@localhost> In-reply-to: <1086638426.86807.40.camel@jester> References: <40C48DA6.3356.48DAC2EB@localhost> X-mailer: Pegasus Mail for Windows (v4.12a) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200406/70 X-Sequence-Number: 7128 On 7 Jun 2004 at 16:00, Rod Taylor wrote: > On Mon, 2004-06-07 at 15:45, Dan Langille wrote: > > A production system has had a query recently degrade in performance. > > What once took < 1s now takes over 1s. I have tracked down the > > problem to a working example. > > What changes have you made to postgresql.conf? Nothing recently (ie. past few months). Nothing at all really. Perhaps I need to start tuning that. > Could you send explain analyse again with SEQ_SCAN enabled but with > nested loops disabled? See http://rafb.net/paste/results/zpJEvb28.html 13s > Off the cuff? I might hazard a guess that effective_cache is too low or > random_page_cost is a touch too high. Probably the former. I grep'd postgresql.conf: #effective_cache_size = 1000 # typically 8KB each #random_page_cost = 4 # units are one sequential page fetch cost NOTE: both above are commented out. Thank you -- Dan Langille : http://www.langille.org/ BSDCan - http://www.bsdcan.org/