X-Original-To: pgsql-performance@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 2EC7F475C98 for ; Tue, 25 Feb 2003 18:06:19 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 12427-02 for ; Tue, 25 Feb 2003 18:05:50 -0500 (EST) Received: from ms-smtp-01.texas.rr.com (ms-smtp-01.texas.rr.com [24.93.36.229]) by postgresql.org (Postfix) with ESMTP id 1523B475C26 for ; Tue, 25 Feb 2003 17:44:14 -0500 (EST) Received: from spaceship.com (cs24243214-140.austin.rr.com [24.243.214.140]) by ms-smtp-01.texas.rr.com (8.12.5/8.12.2) with ESMTP id h1PMcPU1023372 for ; Tue, 25 Feb 2003 17:38:26 -0500 (EST) Message-ID: <3E5BF1BD.9070301@spaceship.com> Date: Tue, 25 Feb 2003 16:44:13 -0600 From: Matt Mello User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021130 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Faster 'select count(*) from table' ? References: <3E564695.7030906@digital-ics.com> <15034.1045842303@sss.pgh.pa.us> In-Reply-To: <15034.1045842303@sss.pgh.pa.us> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new X-Archive-Number: 200302/202 X-Sequence-Number: 1258 Does anyone know if there is a fast way to find out how many records are in a table? "Select count(*) from table" is very slow. I would think that PG would keep up with the number of undeleted rows on a realtime basis. Is that the case? If so, how would I query it? Hope this is the correct list for this question. Thanks! -- Matt Mello