X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 5441711F6004 for ; Fri, 28 Apr 2006 14:43:44 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 58739-09 for ; Fri, 28 Apr 2006 14:43:33 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from skynet.simkin.ca (skynet.simkin.ca [199.175.137.210]) by postgresql.org (Postfix) with ESMTP id 4C1B111F6067 for ; Fri, 28 Apr 2006 14:43:32 -0300 (ADT) Received: from charon.medialogik.com (S0106000c6eb33e73.vf.shawcable.net [70.68.174.20]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by skynet.simkin.ca (Postfix) with ESMTP id C054A106F5 for ; Fri, 28 Apr 2006 10:43:31 -0700 (PDT) From: Alan Hodgson Organization: Simkin Network Consulting To: pgsql-performance@postgresql.org Subject: Re: Why so slow? Date: Fri, 28 Apr 2006 10:43:15 -0700 User-Agent: KMail/1.8.3 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200604281043.16083@hal.medialogik.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200604/680 X-Sequence-Number: 18764 On April 28, 2006 10:31 am, "Bealach-na Bo" wrote: > The exclusive lock is going to cause problems for me since the table is > very active. Is there a way of getting around that or do I need to > schedule the application that accesses this table? If you don't need access to the old data constantly: - copy the live data to a new table - TRUNCATE the old table (which needs an exclusive lock but is very fast) - insert the data back in - for an event log I would imagine this could work If you do need the old data while the app is running then I'm not sure what you can do. > > I'm running version 8.0. Is there autovacuum for this version too? There is an autovacuum daemon in contrib; it's more annoying to setup and keep running than the one built into 8.1, but it works OK. -- Eat right. Exercise regularly. Die anyway.