Re: Really really slow select count(*)

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: felix <crucialfelix(at)gmail(dot)com>
Cc: sthomas(at)peak6(dot)com, "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Really really slow select count(*)
Date: 2011-02-04 17:40:42
Message-ID: AANLkTikpH2ws_iiyqNE-o-TWB0-5pMbrS0V5SymXBo2X@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Fri, Feb 4, 2011 at 10:38 AM, felix <crucialfelix(at)gmail(dot)com> wrote:
>
>
> On Fri, Feb 4, 2011 at 5:35 PM, Shaun Thomas <sthomas(at)peak6(dot)com> wrote:
>>
>>
>> vacuumdb -a -v -z &>vacuum.log
>>
>> And at the end of the log, it'll tell you how many pages it wants, and how
>> many pages were available.
>
> this is the dev, not live. but this is after it gets done with that table:
> CPU 0.00s/0.00u sec elapsed 0.00 sec.
> INFO:  analyzing "public.fastadder_fastadderstatus"
> INFO:  "fastadder_fastadderstatus": scanned 2492 of 2492 pages, containing
> 154378 live rows and 0 dead rows; 30000 rows in sample, 154378 estimated
> total rows
> and there's nothing at the end of the whole vacuum output about pages
> actual command:
> vacuumdb -U postgres -W -v -z djns4 &> vacuum.log
> I tried it with all databases too

I believe you have to run it on the whole db to get that output.

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message felix 2011-02-04 17:44:52 Re: Really really slow select count(*)
Previous Message felix 2011-02-04 17:38:15 Re: Really really slow select count(*)