Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id EC8C79FBF99 for ; Wed, 20 Jun 2007 14:28:26 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 83805-01-8 for ; Wed, 20 Jun 2007 14:28:20 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from silene.metacarta.com (silene.metacarta.com [65.77.47.18]) by postgresql.org (Postfix) with ESMTP id 989429FBFAC for ; Wed, 20 Jun 2007 14:28:18 -0300 (ADT) Received: from localhost (silene.metacarta.com [65.77.47.18]) by silene.metacarta.com (Postfix) with ESMTP id ECE5414C8604; Wed, 20 Jun 2007 13:28:14 -0400 (EDT) Received: from silene.metacarta.com ([65.77.47.18]) by localhost (silene.metacarta.com [65.77.47.18]) (amavisd-new, port 10024) with ESMTP id 30915-02; Wed, 20 Jun 2007 13:28:12 -0400 (EDT) X-Auth-Received: from [65.77.47.195] (dhcp-65-77-47-195.metacarta.com [65.77.47.195]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by silene.metacarta.com (Postfix) with ESMTP id 2D3EA14C860D; Wed, 20 Jun 2007 13:28:10 -0400 (EDT) Message-ID: <467963A8.2060703@metacarta.com> Date: Wed, 20 Jun 2007 13:28:08 -0400 From: Karl Wright User-Agent: Thunderbird 2.0.0.4 (Windows/20070604) MIME-Version: 1.0 To: Francisco Reyes Cc: Alvaro Herrera , Tom Lane , pgsql-performance@postgresql.org Subject: Re: Performance query about large tables, lots of concurrent access References: <4676DD57.7070304@metacarta.com> <14291.1182221811@sss.pgh.pa.us> <4677B831.8060704@metacarta.com> <4677D298.2010109@metacarta.com> <20070619132643.GC4265@alvh.no-ip.org> <4677DC06.3000300@metacarta.com> <20070619134637.GG4265@alvh.no-ip.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at metacarta.com X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.058 tagged_above=0 required=5 tests=AWL=-0.627, BAYES_40=-0.185, SUBJ_HAS_SPACES=0.87 X-Spam-Level: X-Archive-Number: 200706/430 X-Sequence-Number: 25463 Francisco Reyes wrote: > Alvaro Herrera writes: > >> How large is the database? I must admit I have never seen a database >> that took 4 days to vacuum. This could mean that your database is >> humongous, or that the vacuum strategy is wrong for some reason. > > Specially with 16GB of RAM. > > I have a setup with several databases (the largest of which is 1TB > database) and I do a nightly vacuum analyze for ALL databases. It takes > about 22 hours. And this is with constant updates to the large 1TB > database. This is with Postgresql 8.1.3 Okay - I started a VACUUM with the 8.1 database yesterday morning, having the database remain under load. As of 12:30 today (~27 hours), the original VACUUM was still running. At that point: (a) I had to shut it down anyway because I needed to do another experiment having to do with database export/import performance, and (b) the performance of individual queries had already degraded significantly in the same manner as what I'd seen before. So, I guess this means that there's no way I can keep the database adequately vacuumed with my anticipated load and hardware. One thing or the other will have to change. Is the VACUUM in 8.2 significantly faster than the one in 8.1? Or, is the database less sensitive performance-wise to delayed VACUUM commands? Karl