pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Shawn <postgres@xmtservices.net>
Cc: pgsql-performance@postgresql.org
Subject: Re: Slow Query
Date: Mon, 03 Sep 2007 20:49:42 -0400
Message-ID: <6184.1188866982@sss.pgh.pa.us> (raw)
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>

Shawn <postgres@xmtservices.net> writes:
> "Kevin Grittner" <Kevin.Grittner@wicourts.gov> 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



view thread (112+ messages)  latest in thread

Message-ID: <6184.1188866982@sss.pgh.pa.us>
Permalink:  ../6184.1188866982@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/6184.1188866982@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, postgres@xmtservices.net
  Subject: Re: Slow Query
  In-Reply-To: <6184.1188866982@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox