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 3D5C69FB359 for ; Tue, 29 Aug 2006 20:34:06 -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 81674-01-3 for ; Tue, 29 Aug 2006 20:34:01 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.180]) by postgresql.org (Postfix) with ESMTP id 3812B9FB4BD for ; Tue, 29 Aug 2006 20:02:23 -0300 (ADT) Received: by py-out-1112.google.com with SMTP id d80so3002398pyd for ; Tue, 29 Aug 2006 16:02:21 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:subject:from:reply-to:to:cc:in-reply-to:references:content-type:organization:date:message-id:mime-version:x-mailer:content-transfer-encoding; b=lJWLwSYHeP8UgPPcDGcG76ZGBvbwYR7/MrtcaeEryEUAMM7RWVWbofdB381MdqQKXo+n7n6mhXII8ROqRQBIK7aKrw5sZgeeeuWh5ddch5DFLJsjTeeePIb+7qqnavT+eUlKP8RQb+tI5NbXiwRj1/x0PmjsM7YzM0x0NHYgm9M= Received: by 10.35.121.2 with SMTP id y2mr248470pym; Tue, 29 Aug 2006 16:02:21 -0700 (PDT) Received: from ?10.50.0.225? ( [216.184.8.18]) by mx.gmail.com with ESMTP id c1sm7035016nzd.2006.08.29.16.02.21; Tue, 29 Aug 2006 16:02:21 -0700 (PDT) Subject: Re: PostgreSQL performance issues From: Codelogic Reply-To: codelogic@gmail.com To: Willo van der Merwe Cc: pgsql-performance@postgresql.org In-Reply-To: <44F446B2.2090900@studentvillage.co.za> References: <44F446B2.2090900@studentvillage.co.za> Content-Type: text/plain Organization: codelogic@gmail.com Date: Tue, 29 Aug 2006 17:16:36 -0700 Message-Id: <1156896996.21893.85.camel@santafe> Mime-Version: 1.0 X-Mailer: Evolution 2.6.1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.199 tagged_above=0 required=5 tests=DNS_FROM_RFC_ABUSE, SPF_PASS X-Spam-Level: X-Archive-Number: 200608/463 X-Sequence-Number: 20648 On Tue, 2006-08-29 at 15:52 +0200, Willo van der Merwe wrote: > (cost=0.00..51848.56 rows=1309356 width=0) It is going through way more number of rows than what is returned by the count(*). It appears that you need to VACUUM the table (not VACUUM ANALYZE).