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 80D68533F0 for ; Sun, 27 Mar 2005 22:24:22 +0100 (BST) 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 18244-09 for ; Sun, 27 Mar 2005 21:24:13 +0000 (GMT) Received: from flake.decibel.org (natpool.bovine.net [67.100.216.14]) by svr1.postgresql.org (Postfix) with ESMTP id 85C1C533FF for ; Sun, 27 Mar 2005 22:24:13 +0100 (BST) Received: by flake.decibel.org (Postfix, from userid 1001) id 597F3153B3; Sun, 27 Mar 2005 15:24:15 -0600 (CST) Date: Sun, 27 Mar 2005 15:24:15 -0600 From: "Jim C. Nasby" To: Josh Berkus Cc: pgsql-docs@postgresql.org Subject: Re: [PATCHES] Approximate count(*) Message-ID: <20050327212415.GQ51784@decibel.org> References: <125db1c7753893171b6ef46609035de8@biglumber.com> <200503241919.00628.josh@agliodbs.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200503241919.00628.josh@agliodbs.com> X-Operating-System: FreeBSD 4.11-RELEASE i386 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.047 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200503/22 X-Sequence-Number: 2918 Josh, David- Do you think it's worth adding a function that would do the select for you? IE: tuplecount('schema', 'tablename')? On Thu, Mar 24, 2005 at 07:19:00PM -0800, Josh Berkus wrote: > David, > > If Jim and I finish our work for 8.1, then you'll be able to do: > > SELECT approx_records FROM pg_sysviews.pg_tables WHERE schema_name = 'schema' > AND table_name = 'table' > > But the same caveats will apply. > > -- > Josh Berkus > Aglio Database Solutions > San Francisco > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster > -- Jim C. Nasby, Database Consultant decibel@decibel.org Give your computer some brain candy! www.distributed.net Team #1828 Windows: "Where do you want to go today?" Linux: "Where do you want to go tomorrow?" FreeBSD: "Are you guys coming, or what?"