Skip site navigation (1) Skip section navigation (2)

Re: speeding up COUNT and DISTINCT queries

From: Max Baker <max(at)warped(dot)org>
To: Joe Conway <mail(at)joeconway(dot)com>
Cc: Manfred Koizar <mkoi-pg(at)aon(dot)at>,PostgreSQL Performance Mailing List <pgsql-performance(at)postgresql(dot)org>
Subject: Re: speeding up COUNT and DISTINCT queries
Date: 2003-03-13 02:05:47
Message-ID: 20030313020546.GQ30411@warped.org (view raw or flat)
Thread:
Lists: pgsql-performance
On Wed, Mar 12, 2003 at 05:57:50PM -0800, Joe Conway wrote:
> Max Baker wrote:
> >Thanks for the help.  I guess i'm not clear on why there is so much
> >extra cruft.  Does postgres leave a little bit behind every time it does
> >an update?  Because this table is updated constantly.
> >
> 
> Yes. See:
> http://www.us.postgresql.org/users-lounge/docs/7.3/postgres/routine-vacuuming.html

That would explain why once a night isn't enough.  Thanks. 
The contents of this table get refreshed every 4 hours.  I'll add a
vacuum after every refresh and comapre the results in a couple days.

-m

In response to

Responses

pgsql-performance by date

Next:From: Christopher Kings-LynneDate: 2003-03-13 02:20:04
Subject: Re: speeding up COUNT and DISTINCT queries
Previous:From: Joe ConwayDate: 2003-03-13 01:57:50
Subject: Re: speeding up COUNT and DISTINCT queries

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group