Re: speeding up COUNT and DISTINCT queries

From: Manfred Koizar <mkoi-pg(at)aon(dot)at>
To: Max Baker <max(at)warped(dot)org>
Cc: PostgreSQL Performance Mailing List <pgsql-performance(at)postgresql(dot)org>
Subject: Re: speeding up COUNT and DISTINCT queries
Date: 2003-03-12 23:48:27
Message-ID: a7hv6v4c6vt4vi2eg8s3dmgg3dskggob84@4ax.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Wed, 12 Mar 2003 14:38:11 -0800, Max Baker <max(at)warped(dot)org> wrote:
> -> Seq Scan on node (cost=0.00..107737.61 rows=35561
> width=6) (actual time=6.73..44383.57 rows=34597 loops=1)

35000 tuples in 100000 pages?

>I run VACCUUM ANALYZE once a day.

Try VACUUM FULL VERBOSE ANALAYZE; this should bring back your table
to a reasonable size. If the table starts growing again, VACUUM more
often.

Servus
Manfred

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Max Baker 2003-03-13 01:00:19 Re: speeding up COUNT and DISTINCT queries
Previous Message Jean-Luc Lachance 2003-03-12 23:40:36 Re: speeding up COUNT and DISTINCT queries