X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id A25E7D1DE82 for ; Fri, 12 Dec 2003 09:14:42 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 91701-08 for ; Fri, 12 Dec 2003 05:14:13 -0400 (AST) Received: from smtp.pspl.co.in (unknown [202.54.11.65]) by svr1.postgresql.org (Postfix) with ESMTP id 59238D1B554 for ; Fri, 12 Dec 2003 05:14:10 -0400 (AST) Received: (from root@localhost) by smtp.pspl.co.in (8.12.9/8.12.9) id hBC9EHe3010031 for ; Fri, 12 Dec 2003 14:44:17 +0530 Received: from persistent.co.in (daithan.intranet.pspl.co.in [192.168.7.161]) (authenticated bits=0) by persistent.co.in (8.12.9/8.12.9) with ESMTP id hBC9EEAo009969; Fri, 12 Dec 2003 14:44:15 +0530 Message-ID: <3FD986DD.7000909@persistent.co.in> Date: Fri, 12 Dec 2003 14:44:05 +0530 From: Shridhar Daithankar Organization: Persistent Systems Pvt. Ltd. User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "david@shadovitz.com" Cc: "'pgsql-performance@postgresql.org'" Subject: Re: Query plan - now what? References: <01C3C045.7EDD13C0.david@shadovitz.com> In-Reply-To: <01C3C045.7EDD13C0.david@shadovitz.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200312/195 X-Sequence-Number: 5055 David Shadovitz wrote: > Well, now that I have the plan for my slow-running query, what do I do? Where > should I focus my attention? Briefly looking over the plan and seeing the estimated v/s actual row mismatch,I can suggest you following. 1. Vacuum(full) the database. Probably you have already done it. 2. Raise statistics_target to 500 or more and reanalyze the table(s) in question. 3. Set enable_hash_join to false, before running the query and see if it helps. HTH Shridhar