Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 1B6179FBB77 for ; Wed, 21 Feb 2007 13:50:01 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 69868-02 for ; Wed, 21 Feb 2007 13:49:43 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from floppy.pyrenet.fr (news.pyrenet.fr [194.116.145.2]) by postgresql.org (Postfix) with ESMTP id F31289FBB6C for ; Wed, 21 Feb 2007 13:49:42 -0400 (AST) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id 050A730AF0; Wed, 21 Feb 2007 18:49:42 +0100 (MET) From: Mark Stosberg X-Newsgroups: pgsql.performance Subject: Re: How to debug performance problems Date: Wed, 21 Feb 2007 12:49:12 -0500 Organization: Hub.Org Networking Services Lines: 23 Message-ID: References: <45D9E646.6060909@modgraph-usa.com> <20070221154520.GA25149@cns.vt.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@news.hub.org User-Agent: Thunderbird 1.5.0.8 (X11/20061109) In-Reply-To: <20070221154520.GA25149@cns.vt.edu> To: pgsql-performance@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.273 tagged_above=0 required=5 tests=AWL, BAYES_50 X-Spam-Level: X-Archive-Number: 200702/212 X-Sequence-Number: 23266 Ray Stell wrote: > I'd like to have a toolbox prepared for when performance goes south. > I'm clueless. Would someone mind providing some detail about how to > measure these four items Craig listed: > > 1. The first thing is to find out which query is taking a lot of time. > > 2. A long-running transaction keeps vacuum from working. > > 3. A table grows just enough to pass a threshold in the > planner and a drastically different plan is generated. I just ran into a variation of this: 3.5 A table grows so large so that VACUUMING it takes extremely long, interfering with the general performance of the system. In our case, we think the table had about 36 million rows when it hit that threshold. I'm now working on a better solution for that table. Mark