X-Original-To: pgsql-performance@postgresql.org Received: from cat (adsl-66-123-169-52.dsl.sntc01.pacbell.net [66.123.169.52]) by postgresql.org (Postfix) with ESMTP id 4FA6A476350 for ; Wed, 12 Mar 2003 21:05:45 -0500 (EST) Received: by cat (Postfix, from userid 501) id 449C7B6D69; Wed, 12 Mar 2003 18:05:47 -0800 (PST) Date: Wed, 12 Mar 2003 18:05:47 -0800 From: Max Baker To: Joe Conway Cc: Manfred Koizar , PostgreSQL Performance Mailing List Subject: Re: speeding up COUNT and DISTINCT queries Message-ID: <20030313020546.GQ30411@warped.org> References: <20030312223811.GM30411@warped.org> <20030313015540.GP30411@warped.org> <3E6FE59E.1050602@joeconway.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3E6FE59E.1050602@joeconway.com> User-Agent: Mutt/1.5.3i X-Archive-Number: 200303/92 X-Sequence-Number: 1390 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