X-Original-To: pgsql-docs-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id C0793534BA; Thu, 24 Mar 2005 17:58:30 +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 12674-02; Thu, 24 Mar 2005 17:58:28 +0000 (GMT) Received: from fetter.org (dsl092-188-065.sfo1.dsl.speakeasy.net [66.92.188.65]) by svr1.postgresql.org (Postfix) with ESMTP id 6E088534A9; Thu, 24 Mar 2005 17:58:27 +0000 (GMT) Received: from fetter.org (localhost.localdomain [127.0.0.1]) by fetter.org (8.13.1/8.12.10) with ESMTP id j2OHwRcx023132; Thu, 24 Mar 2005 09:58:27 -0800 Received: (from shackle@localhost) by fetter.org (8.13.1/8.13.1/Submit) id j2OHwRp8023131; Thu, 24 Mar 2005 09:58:27 -0800 Date: Thu, 24 Mar 2005 09:58:27 -0800 From: David Fetter To: Tom Lane Cc: PostgreSQL Docs , PostgreSQL Patches Subject: Re: [PATCHES] Approximate count(*) Message-ID: <20050324175827.GC15848@fetter.org> References: <20050324170137.GA15848@fetter.org> <27948.1111685691@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <27948.1111685691@sss.pgh.pa.us> User-Agent: Mutt/1.4.2i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.056 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200503/16 X-Sequence-Number: 2912 On Thu, Mar 24, 2005 at 12:34:51PM -0500, Tom Lane wrote: > David Fetter writes: > > Please find enclosed a patch that shows how to get a quick > > approximation of count(*) on a table. > > I'm not sure we should be encouraging people to look at reltuples... > for one thing, it's deliberately a moving average under 8.0. Should there be more caveats? Cheers, D -- David Fetter david@fetter.org http://fetter.org/ phone: +1 510 893 6100 mobile: +1 415 235 3778 Remember to vote!