Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 7B5A99F9720 for ; Mon, 3 Sep 2007 21:49:49 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 24255-05 for ; Mon, 3 Sep 2007 21:49:40 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 1EB569F9650 for ; Mon, 3 Sep 2007 21:49:45 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id l840nh1i006185; Mon, 3 Sep 2007 20:49:43 -0400 (EDT) To: Shawn cc: pgsql-performance@postgresql.org Subject: Re: Slow Query In-reply-to: <20070903165334.0da769c1@boffin.xmtservices.net> References: <20070901102947.0c0a50a3@boffin.xmtservices.net> <46DA9522.EE98.0025.0@wicourts.gov> <20070903091558.0780b963@boffin.xmtservices.net> <46DC071D.EE98.0025.0@wicourts.gov> <20070903165334.0da769c1@boffin.xmtservices.net> Comments: In-reply-to Shawn message dated "Mon, 03 Sep 2007 16:53:34 -0700" Date: Mon, 03 Sep 2007 20:49:42 -0400 Message-ID: <6184.1188866982@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200709/16 X-Sequence-Number: 26561 Shawn writes: > "Kevin Grittner" wrote: >> Did you ever capture the output of VACUUM VERBOSE against this table > vacuum verbose analyze shawns_data; > ... > INFO: index "shawns_data_pkey" now contains 15445 row versions in > 35230 pages [ and comparably bloated sizes for other indexes ] Ouch! The table itself doesn't look nearly as bad: > INFO: "shawns_data": found 21444 removable, 15445 nonremovable row > versions in 770 pages but you've got a spectacularly bad case of index bloat. An index 50 times bigger than its table is Not Good. I think you'd find that "REINDEX TABLE shawns_data" does wonders for the situation. The next question is how it got to be that way... what is your vacuuming policy for this database? Maybe you need to raise max_fsm_pages? regards, tom lane