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 D0EF411F60A4 for ; Fri, 28 Apr 2006 16:00:03 -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 80481-08 for ; Fri, 28 Apr 2006 15:59:55 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from wolff.to (wolff.to [66.93.197.194]) by postgresql.org (Postfix) with SMTP id 2DD2E11F60A2 for ; Fri, 28 Apr 2006 15:59:54 -0300 (ADT) Received: (qmail 17394 invoked by uid 500); 28 Apr 2006 19:00:05 -0000 Date: Fri, 28 Apr 2006 14:00:05 -0500 From: Bruno Wolff III To: Bealach-na Bo Cc: jnasby@pervasive.com, pgsql-performance@postgresql.org Subject: Re: Why so slow? Message-ID: <20060428190005.GA15689@wolff.to> Mail-Followup-To: Bruno Wolff III , Bealach-na Bo , jnasby@pervasive.com, pgsql-performance@postgresql.org References: <20060428145842.GI97354@pervasive.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200604/683 X-Sequence-Number: 18767 On Fri, Apr 28, 2006 at 17:37:30 +0000, Bealach-na Bo wrote: > >The above shows that the indexes contained 10M rows and 160M of dead > >space each. That means you weren't vacuuming nearly enough. > > How is it that a row in the table can grow to a size far exceeding the sum > of the maximum sized of the fields it consists of? Because unless you run vacuum, the old deleted rows are not reused. Those rows cannot be deleted immediately, because the rows may be visible to other transactions. Periodic vacuums are used to find deleted rows which are no longer visible to any transactions. You probably want to read the following: http://developer.postgresql.org/docs/postgres/routine-vacuuming.html