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 0433753756 for ; Thu, 21 Apr 2005 09:24:31 -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 62393-04 for ; Thu, 21 Apr 2005 12:24:23 +0000 (GMT) Received: from sccrmhc14.comcast.net (sccrmhc14.comcast.net [204.127.202.59]) by svr1.postgresql.org (Postfix) with ESMTP id D8FFE536BC for ; Thu, 21 Apr 2005 09:24:19 -0300 (ADT) Received: from jefftrout.com ([24.61.201.181]) by comcast.net (sccrmhc14) with SMTP id <2005042112242201400f5jd5e>; Thu, 21 Apr 2005 12:24:23 +0000 Received: (qmail 48030 invoked from network); 21 Apr 2005 12:24:56 -0000 Received: from waltham-nat.ma.lycos.com (HELO ?10.124.7.66?) (209.202.205.1) by 192.168.0.109 with SMTP; 21 Apr 2005 12:24:56 -0000 In-Reply-To: References: Mime-Version: 1.0 (Apple Message framework v619.2) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <8c459b7b96e6c310d641cebdfa8dcab6@torgo.978.org> Content-Transfer-Encoding: 7bit Cc: pgsql-performance@postgresql.org From: Jeff Subject: Re: two queries and dual cpu (perplexed) Date: Thu, 21 Apr 2005 08:24:15 -0400 To: "Shoaib Burq (VPAC)" X-Mailer: Apple Mail (2.619.2) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.191 tagged_above=0 required=5 tests=AWL, RCVD_BY_IP, RCVD_IN_SORBS_DUL X-Spam-Level: X-Archive-Number: 200504/554 X-Sequence-Number: 11951 On Apr 21, 2005, at 7:49 AM, Shoaib Burq (VPAC) wrote: > Now I have not touch the $PGDATA/postgresql.conf (As I know very little > about memory tuning) Have run VACCUM & ANALYZE. > You should really, really bump up shared_buffers and given you have 8GB of ram this query would likely benefit from more work_mem. > and the time taken is *twice* that for the original. The modification > was > minor. The queries do make use of both CPUs: > Is this an IO intensive query? If running both in parellel results in 2x the run time and you have sufficient cpus it would (to me) indicate you don't have enough IO bandwidth to satisfy the query. Can we see an explain analyze of the query? Could be a bad plan and a bad plan will never give good performance. -- Jeff Trout http://www.jefftrout.com/ http://www.stuarthamm.net/