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 02B83D1CA94 for ; Tue, 6 Jan 2004 16:34:07 +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 10147-07 for ; Tue, 6 Jan 2004 12:33:18 -0400 (AST) Received: from smtp.pspl.co.in (unknown [202.54.11.65]) by svr1.postgresql.org (Postfix) with ESMTP id 362EBD1CA8E for ; Tue, 6 Jan 2004 12:31:27 -0400 (AST) Received: (from root@localhost) by smtp.pspl.co.in (8.12.9/8.12.9) id i06GVYNo016310 for ; Tue, 6 Jan 2004 22:01:34 +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 i06GVXJN016283 for ; Tue, 6 Jan 2004 22:01:33 +0530 Message-ID: <3FFAE2D8.6080301@persistent.co.in> Date: Tue, 06 Jan 2004 22:01:20 +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 Cc: Postgresql Performance Subject: Re: Select max(foo) and select count(*) optimization References: <200401061212.21344.shridhar_daithankar@persistent.co.in> <200401060718.08444.darcy@druid.net> <200401061750.09530.shridhar_daithankar@persistent.co.in> <1073405003.20751.2.camel@camel> In-Reply-To: <1073405003.20751.2.camel@camel> 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: 200401/68 X-Sequence-Number: 5243 Robert Treat wrote: > On Tue, 2004-01-06 at 07:20, Shridhar Daithankar wrote: >>The numbers from pg_class are estimates updated by vacuum /analyze. Of course >>you need to run vacuum frequent enough for that statistics to be updated all >>the time or run autovacuum daemon.. >>Ran into same problem on my machine till I remembered about vacuum..:-) > Actually you only need to run analyze to update the statistics. Old habits die hard..:-) shridhar