Re: Really really slow select count(*)

From: hubert depesz lubaczewski <depesz(at)depesz(dot)com>
To: felix <crucialfelix(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Really really slow select count(*)
Date: 2011-02-04 14:49:51
Message-ID: 20110204144950.GA4543@depesz.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Fri, Feb 04, 2011 at 03:46:35PM +0100, felix wrote:
> directly after REINDEX and ANALYZE:
>
> Aggregate (cost=62348.70..62348.71 rows=1 width=0) (actual
> time=15830.000..15830.000 rows=1 loops=1)
> -> Seq Scan on fastadder_fastadderstatus (cost=0.00..61613.16
> rows=294216 width=0) (actual time=30.000..15570.000 rows=302479 loops=1)
> Total runtime: 15830.000 ms

do run vacuum of the table. reindex doesn't matter for seq scans, and
analyze, while can help choose different plan - will not help here
anyway.

Best regards,

depesz

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Kenneth Marshall 2011-02-04 14:52:20 Re: [HACKERS] Slow count(*) again...
Previous Message felix 2011-02-04 14:46:35 Really really slow select count(*)