Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id AC4409FB219 for ; Fri, 21 Sep 2007 14:52:04 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 69999-02 for ; Fri, 21 Sep 2007 14:51:59 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from gwmta.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by postgresql.org (Postfix) with ESMTP id 0493C9FB232 for ; Fri, 21 Sep 2007 14:52:00 -0300 (ADT) Received: from Courts-MTA by gwmta.wicourts.gov with Novell_GroupWise; Fri, 21 Sep 2007 12:52:00 -0500 Message-Id: <46F3BE6C.EE98.0025.0@wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 7.0.2 Date: Fri, 21 Sep 2007 12:51:57 -0500 From: "Kevin Grittner" To: , Subject: Re: Low CPU Usage References: <121711.47531.qm@web30006.mail.mud.yahoo.com> In-Reply-To: <121711.47531.qm@web30006.mail.mud.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200709/376 X-Sequence-Number: 26921 >>> On Fri, Sep 21, 2007 at 12:30 PM, in message <121711.47531.qm@web30006.mail.mud.yahoo.com>, wrote:=20 =20 > This is the plan for the old server: > Hash Join (cost=3D449.55..8879.24 rows=3D136316 width=3D904) (actual=20 > time=3D50.734..1632.491 rows=3D136316 loops=3D1) . . . > Total runtime: 2022.293 ms =20 > And this is the plan for the new server: > Hash Join (cost=3D412.86..9524.13 rows=3D136316 width=3D905) (actual=20 > time=3D9.421..506.376 rows=3D136316 loops=3D1) . . . > Total runtime: 553.619 ms =20 > I see an "outer" join in the plan for the new server. This is weird!!! = There=20 > are the same databases in both servers. =20 That's just a matter of labeling the tables with role rather than alias. The plans look the same to me. =20 > The old one runs this query for about 37 seconds and for the new one = for=20 > about 301 seconds. =20 That's not what it looks like based on the EXPLAIN ANALYZE output. It looks like run time dropped from two seconds to half a second. =20 It seems as though you either have a network delay delivering the results, or your application is slow to read them. Exactly how are you arriving at those timings you're reporting to us? =20 -Kevin =20