Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 551EC9FBE95 for ; Wed, 20 Jun 2007 14:53:18 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 01692-02 for ; Wed, 20 Jun 2007 14:53:13 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from zoraida.natserv.net (p65-147.acedsl.com [66.114.65.147]) by postgresql.org (Postfix) with ESMTP id DF2019FB43C for ; Wed, 20 Jun 2007 14:53:14 -0300 (ADT) Received: by zoraida.natserv.net (Postfix, from userid 58) id AE3E1C2F6; Wed, 20 Jun 2007 13:53:13 -0400 (EDT) Received: from 35st.simplicato.com (static-71-249-233-130.nycmny.east.verizon.net [71.249.233.130]) by zoraida.natserv.net (Postfix) with ESMTP id C0466C2AF; Wed, 20 Jun 2007 13:53:07 -0400 (EDT) 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> <467963A8.2060703@metacarta.com> Message-ID: X-Mailer: http://www.courier-mta.org/cone/ From: Francisco Reyes To: Karl Wright Cc: Alvaro Herrera , Tom Lane , pgsql-performance@postgresql.org Subject: Re: Performance query about large tables, lots of concurrent access Date: Wed, 20 Jun 2007 13:53:07 -0400 Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="US-ASCII" Content-Disposition: inline Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.285 tagged_above=0 required=5 tests=AWL=0.149, BAYES_50=0.001, FORGED_RCVD_HELO=0.135 X-Spam-Level: X-Archive-Number: 200706/433 X-Sequence-Number: 25466 Karl Wright writes: > 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: I don't recall if you said it already, but what is your maintenance_work_mem? > (a) I had to shut it down anyway because I needed to do another > experiment having to do with database export/import performance, and Do you know which tables change the most often? Have you tried to do vacuum of those one at a time and see how long they take? > (b) the performance of individual queries had already degraded > significantly in the same manner as what I'd seen before. If you have a lot of inserts perhaps you can do analyze more often also. > So, I guess this means that there's no way I can keep the database > adequately vacuumed with my anticipated load and hardware. It is a possibility, but you could consider other strategies.. totally dependant on the programs accessing the data.. For example: do you have any historical data that never changes? Could that be moved to a different database in that same machine or another machine? That would decrease your vacuum times. Also partitioning the data so data that never changes is in separate tables may also help (but I am not sure of this). Given the sizes you sent to the list, it may be simply that it is more than the hardware can handle.