Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 74CC59FA23F for ; Fri, 24 Nov 2006 20:10:13 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 92356-05 for ; Fri, 24 Nov 2006 20:10:10 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 92FC79FA178 for ; Fri, 24 Nov 2006 20:10:09 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id kAP0A5EB001165; Fri, 24 Nov 2006 19:10:05 -0500 (EST) To: "Gopal" cc: pgsql-performance@postgresql.org Subject: Re: Postgres scalability and performance on windows In-reply-to: References: Comments: In-reply-to "Gopal" message dated "Fri, 24 Nov 2006 10:11:57 +0000" Date: Fri, 24 Nov 2006 19:10:05 -0500 Message-ID: <1164.1164413405@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/214 X-Sequence-Number: 21984 "Gopal" writes: > Thanks for your suggestions. Here's an output of the explain analyse. What's the query exactly, and what are the schemas of the tables it uses (psql \d descriptions would do)? The actual runtime seems to be almost all spent in the hash aggregation step: > -> HashAggregate (cost=58.13..58.16 rows=1 width=117) (actual time=15.572..15.573 rows=2 loops=1) > -> Hash IN Join (cost=3.34..58.10 rows=7 width=117) (actual time=0.261..0.544 rows=50 loops=1) 15 msec seems like a long time to aggregate only 50 rows, so I'm wondering what aggregates are being calculated and over what datatypes... regards, tom lane