X-Original-To: pgsql-performance-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 21FB89FB263 for ; Tue, 29 Aug 2006 12:16:11 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 89497-09 for ; Tue, 29 Aug 2006 12:15:42 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.171]) by postgresql.org (Postfix) with ESMTP id 333899FB261 for ; Tue, 29 Aug 2006 12:15:39 -0300 (ADT) Received: from [194.25.154.138] (helo=webserv.wug.de) by mrelayeu.kundenserver.de (node=mrelayeu0) with ESMTP (Nemesis), id 0MKwh2-1GI5JO0MXl-0003t0; Tue, 29 Aug 2006 17:15:34 +0200 Received: from kretschmer by webserv.wug.de with local (Exim 3.36 #1) id 1GI5JN-0001zC-00; Tue, 29 Aug 2006 17:15:33 +0200 Date: Tue, 29 Aug 2006 17:15:33 +0200 From: "A. Kretschmer" To: Willo van der Merwe , pgsql-performance@postgresql.org Subject: Re: PostgreSQL performance issues Message-ID: <20060829151533.GA7586@localhost.localdomain> References: <44F446B2.2090900@studentvillage.co.za> <20060829144636.GA6796@localhost.localdomain> <44F4554F.40906@studentvillage.co.za> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <44F4554F.40906@studentvillage.co.za> User-Agent: Mutt/1.5.9i X-Provags-ID: kundenserver.de abuse@kundenserver.de login:51ea9561fc3f6d9539a2acd743e4748c X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.705 tagged_above=0 required=5 tests=AWL, SPF_HELO_PASS X-Spam-Level: X-Archive-Number: 200608/460 X-Sequence-Number: 20645 am Tue, dem 29.08.2006, um 16:55:11 +0200 mailte Willo van der Merwe folgendes: > >>4 1/2 seconds for a count(*) ? This seems a bit rough - is there anything > >>else > >> > > > >Because of MVCC. > >http://www.thescripts.com/forum/thread173678.html > >http://www.varlena.com/GeneralBits/120.php > >http://www.varlena.com/GeneralBits/49.php > > > > > >Andreas > > > Hi Andreas, > > Thanks for your prompt reply. I understand why this is a sequential > scan, I'm just a bit perturbed that it takes 4.5 seconds to execute said > scan. The table is only 750,000 records big. What happens when this > table 7 million records big? Will this query then take 45 seconds to > execute? How often do you need a 'select count(*) from big_table'? I assume, not frequently. And if you need realy this, you can write a trigger or read the statistics for the table. Andreas -- Andreas Kretschmer Kontakt: Heynitz: 035242/47215, D1: 0160/7141639 (mehr: -> Header) GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net