Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id A58939F931E for ; Mon, 24 Sep 2007 11:23:56 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 36465-02 for ; Mon, 24 Sep 2007 11:23:52 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.227]) by postgresql.org (Postfix) with ESMTP id 29F8D9F9D5A for ; Mon, 24 Sep 2007 11:23:52 -0300 (ADT) Received: by nz-out-0506.google.com with SMTP id l8so825294nzf for ; Mon, 24 Sep 2007 07:23:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=WjJdFF/lsXBOQ0yZOp1xNE/wrNdKuMzbB0reVJrJr0c=; b=RnggNw0RVvMoDhFSMt8ltUu5NkxcnO28G7FmxE7Gs9T+ILWfMwWcj30R3BZRBXFB5Y7Zz/iIx1FvQg1m97wPcnnqe3aAA/JemsQgmekcgcJnYADLCSjk/1Zx2+kia5I1m4epTR3mPC+ckGq+feWdNfjT/yPHHu8SPHdo8guqjA0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=HyV5fW4h5dzaLp1ZTgEAfaUO9FE0xtxpqnZCXNADrt4UJQIvl2aO2dUoMjKfFjukbnN4SaCw5yrQe97llCoVDJfe6frypIlOiHVVUsq5Lsty6+8IInCmAHd513fOWwtS8JsCKq9alApL57NV0mIv7HvYxa057r97WOhbYLjuaUw= Received: by 10.143.161.3 with SMTP id n3mr1089595wfo.1190643829859; Mon, 24 Sep 2007 07:23:49 -0700 (PDT) Received: by 10.142.90.1 with HTTP; Mon, 24 Sep 2007 07:23:49 -0700 (PDT) Message-ID: <2e78013d0709240723w7dc0379ai7f8b323f45439b15@mail.gmail.com> Date: Mon, 24 Sep 2007 19:53:49 +0530 From: "Pavan Deolasee" To: "=?ISO-8859-1?Q?G=E1bor_Farkas?=" Subject: Re: select count(*) performance (vacuum did not help) Cc: pgsql-performance@postgresql.org In-Reply-To: <46F7C494.1050604@nekomancer.net> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_40803_12626009.1190643829861" References: <46F7C494.1050604@nekomancer.net> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200709/418 X-Sequence-Number: 26963 ------=_Part_40803_12626009.1190643829861 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 9/24/07, G=E1bor Farkas wrote: > > > INFO: "main_activity": found 41001 removable, 11672 nonremovable row > versions in 160888 pages > DETAIL: 0 dead row versions cannot be removed yet. > There were 14029978 unused item pointers. > 0 pages are entirely empty. > CPU 5.53s/1.71u sec elapsed 227.35 sec. > INFO: analyzing "public.main_activity" > INFO: "main_activity": 160888 pages, 4500 rows sampled, 4594 estimated > total rows > > Looking at the number of rows vs number of pages, ISTM that VACUUM FULL should help you. Thanks, Pavan --=20 Pavan Deolasee EnterpriseDB http://www.enterprisedb.com ------=_Part_40803_12626009.1190643829861 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline

On 9/24/07, G=E1bor Farkas <gabo= r@nekomancer.net> wrote:

INFO:  "main_activity": found 41001 removable, 1167= 2 nonremovable row
versions in 160888 pages
DETAIL:  0 dead= row versions cannot be removed yet.
There were 14029978 unused item poi= nters.
0 pages are entirely empty.
CPU 5.53s/1.71u sec elapsed 227.35 sec.
INFO:  analyzing &= quot;public.main_activity"
INFO:  "main_activity&quo= t;: 160888 pages, 4500 rows sampled, 4594 estimated
total rows


Looking at the number of rows vs number of pages, ISTM that VACUUM FULL=
should help you.

Thanks,
Pavan

--
Pa= van Deolasee
EnterpriseDB     http://www.enterprisedb.com ------=_Part_40803_12626009.1190643829861--