X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 0DB93D77A5 for ; Wed, 12 Oct 2005 13:39:56 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 63984-05 for ; Wed, 12 Oct 2005 16:39:50 +0000 (GMT) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.197]) by svr1.postgresql.org (Postfix) with ESMTP id 38BE2D7F1C for ; Wed, 12 Oct 2005 13:39:49 -0300 (ADT) Received: by xproxy.gmail.com with SMTP id i30so88731wxd for ; Wed, 12 Oct 2005 09:39:50 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=AppSrkF+WkN/G6H11Jkdv4zoMdDRYGHoXs9TxIucunYatFWJe+QqD749gz76wSJREWz5KbH9LywleF0kP/XuAjBPd1dzWE6SCoJ/8JQbSTu9wWVKN3T5HuplvO3dweDQDvZrpmNCKXqvhqUlUNKPb9mFO5UuEriNY3qDt4ehwOg= Received: by 10.70.89.8 with SMTP id m8mr242254wxb; Wed, 12 Oct 2005 09:39:50 -0700 (PDT) Received: by 10.70.128.19 with HTTP; Wed, 12 Oct 2005 09:39:50 -0700 (PDT) Message-ID: Date: Wed, 12 Oct 2005 11:39:50 -0500 From: Matthew Nuzum Reply-To: newz@bearfruit.org To: Csaba Nagy Subject: Re: Help tuning postgres Cc: pgsql-performance@postgresql.org In-Reply-To: <1129128315.2995.174.camel@coppola.muc.ecircle.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <1129128315.2995.174.camel@coppola.muc.ecircle.de> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.369 required=5 tests=[AWL=0.345, RCVD_BY_IP=0.024] X-Spam-Level: X-Archive-Number: 200510/212 X-Sequence-Number: 14980 On 10/12/05, Csaba Nagy wrote: > We have adapted our application (originally written for oracle) to > postgres, and switched part of our business to a postgres data base. > The data base has in the main tables around 150 million rows, the whole > data set takes ~ 30G after the initial migration. After ~ a month of > usage that bloated to ~ 100G. We installed autovacuum after ~ 2 weeks. > > The main table is heavily updated during the active periods of usage, > which is coming in bursts. > > Now Oracle on the same hardware has no problems handling it (the load), > but postgres comes to a crawl. Examining the pg_stats_activity table I > see the updates on the main table as being the biggest problem, they are > very slow. The table has a few indexes on it, I wonder if they are > updated too on an update ? The index fields are not changing. In any > case, I can't explain why the updates are so much slower on postgres. I'm not the most experience person on this list, but I've got some big tables I work with. Doing an update on these big tables often involves a sequential scan which can be quite slow. I would suggest posting the explain analyze output for one of your slow updates. I'll bet it is much more revealing and takes out a lot of the guesswork. -- Matthew Nuzum www.bearfruit.org