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 BB4BD3A6168 for ; Fri, 28 Jan 2005 05:18:00 +0000 (GMT) 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 01461-03 for ; Fri, 28 Jan 2005 05:17:58 +0000 (GMT) Received: from web14424.mail.yahoo.com (web14424.mail.yahoo.com [216.136.174.220]) by svr1.postgresql.org (Postfix) with SMTP id 69A073A4280 for ; Fri, 28 Jan 2005 05:17:57 +0000 (GMT) Received: (qmail 54354 invoked by uid 60001); 28 Jan 2005 05:17:56 -0000 Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; b=jvQTg6zErl353siic9EkXYhzXeT4cRteZcGuj9n/rvoGDn7AkyKQ7l73zvAXv2JXGncThyU+zT5pHu4fy7U3eYFxNaqKpPPHn/MBwbnN2q/JwP8oVzvlbeLyirFaR7iRX88IZDveRFrca/Cwf4a5nANh7eqkTBH105/eKLGCENY= ; Message-ID: <20050128051756.54352.qmail@web14424.mail.yahoo.com> Received: from [196.40.10.250] by web14424.mail.yahoo.com via HTTP; Thu, 27 Jan 2005 21:17:56 PST Date: Thu, 27 Jan 2005 21:17:56 -0800 (PST) From: Zavier Sheran Subject: slow count() To: pgsql-performance@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.374 tagged_above=0 required=5 tests=DNS_FROM_RFC_ABUSE X-Spam-Level: X-Archive-Number: 200501/561 X-Sequence-Number: 10251 quote from manual: -- Unfortunately, there is no similarly trivial query that can be used to improve the performance of count() when applied to the entire table -- does count(1) also cause a sequential scan of the entire table? It should be able to just use the primary keys. -Zavier ===== --- zavier.net - Internet Solutions --- __________________________________ Do you Yahoo!? Yahoo! Mail - now with 250MB free storage. Learn more. http://info.mail.yahoo.com/mail_250