X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id E2DF5D1B544 for ; Mon, 27 Oct 2003 07:23:08 +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 92007-08 for ; Mon, 27 Oct 2003 03:22:39 -0400 (AST) Received: from smtp.pspl.co.in (www.pspl.co.in [202.54.11.65]) by svr1.postgresql.org (Postfix) with ESMTP id 59476D1B50A for ; Mon, 27 Oct 2003 03:22:33 -0400 (AST) Received: (from root@localhost) by smtp.pspl.co.in (8.12.9/8.12.9) id h9R7MZN3015066 for ; Mon, 27 Oct 2003 12:52:35 +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 h9R7MYfQ015039; Mon, 27 Oct 2003 12:52:35 +0530 Message-ID: <3F9CC7B3.2090501@persistent.co.in> Date: Mon, 27 Oct 2003 12:52:27 +0530 From: Shridhar Daithankar Organization: Persistent Systems Pvt. Ltd. User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031013 Thunderbird/0.3 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Dror Matalon Cc: pgsql-performance@postgresql.org Subject: Re: Various performance questions References: <20031026194449.GD2979@rlx11.zapatec.com> <87u15vxrue.fsf@stark.dyndns.tv> <20031027045431.GE2979@rlx11.zapatec.com> <20031027071703.GF2979@rlx11.zapatec.com> In-Reply-To: <20031027071703.GF2979@rlx11.zapatec.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: 200310/664 X-Sequence-Number: 4412 Dror Matalon wrote: > On Mon, Oct 27, 2003 at 01:04:49AM -0500, Christopher Browne wrote: >>Most of the time involves: >> >> a) Reading each page of the table, and >> b) Figuring out which records on those pages are still "live." > > > The table has been VACUUM ANALYZED so that there are no "dead" records. > It's still not clear why select count() would be slower than select with > a "where" clause. Do a vacuum verbose full and then everything should be within small range of each other. Also in the where clause, does explicitly typecasting helps? Like 'where channel<5000::int2;' HTH Shridhar