X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 06C01DBDF9 for ; Fri, 25 Nov 2005 15:36:40 -0400 (AST) 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 73941-07 for ; Fri, 25 Nov 2005 19:36:38 +0000 (GMT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.192]) by svr1.postgresql.org (Postfix) with ESMTP id 97137DBDF8 for ; Fri, 25 Nov 2005 15:36:35 -0400 (AST) Received: by wproxy.gmail.com with SMTP id 55so714650wri for ; Fri, 25 Nov 2005 11:36:36 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=Y4ngQ8e4GRwETACod41hWBFRmXd2/Lbc6yVcPSCQYweagTH86PRjucJTu6Do68ky55uBF1n3TJ7oTw26Z3LLGop+4yurxDY+oTFza34EqZI7fY2QiYUdpJeCm1NTAz7obqE6pOP0AwzqUXvk/bt6C2sA081cNiD0nX5QkXgOGrw= Received: by 10.65.137.14 with SMTP id p14mr8966872qbn; Fri, 25 Nov 2005 11:36:36 -0800 (PST) Received: by 10.65.177.1 with HTTP; Fri, 25 Nov 2005 11:36:35 -0800 (PST) Message-ID: <3cf983d0511251136j1afa0ec4i9a3987d250befe47@mail.gmail.com> Date: Fri, 25 Nov 2005 19:36:35 +0000 From: Rodrigo Madera To: pgsql-performance@postgresql.org Subject: Newbie question: ultra fast count(*) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200511/513 X-Sequence-Number: 15770 I have been reading all this technical talk about costs and such that I don't (_yet_) understand. Now I'm scared... what's the fastest way to do an equivalent of count(*) on a table to know how many items it has? Thanks, Rodrigo