Skip site navigation (1) Skip section navigation (2)

Re: Big index sizes

From: "Robert Haas" <robertmhaas(at)gmail(dot)com>
To: "Laszlo Nagy" <gandalf(at)shopzeus(dot)com>
Cc: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Big index sizes
Date: 2008-12-30 14:43:28
Message-ID: 603c8f070812300643n3bcc0454j2022d4efaa6122d5@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-performance
On Tue, Dec 30, 2008 at 4:05 AM, Laszlo Nagy <gandalf(at)shopzeus(dot)com> wrote:
> We have serveral table where the index size is much bigger than the table
> size.

You'll usually get index bloat in roughly the same measure that you
get table bloat.  If you always (auto)vacuum regularly, then the
amount of bloat in your indexes probably reflects the amount of bloat
that your tables typically accumulate between vacuums, so reindexing
won't help much.  The indexes will just re-bloat back to about the
same point over the next vacuum cycle or two.

On the other hand, if your table has shrunk considerably, or if you've
just removed a lot of bloat by vacuuming, REINDEX is often warranted.

It would be nice if the system could automatically notice and correct
situations that currently require VACUUM FULL or REINDEX, but it
doesn't.

...Robert

In response to

pgsql-performance by date

Next:From: Robert HaasDate: 2008-12-30 14:50:55
Subject: Re: perform 1 check vs exception when unique_violation
Previous:From: Laszlo NagyDate: 2008-12-30 13:17:01
Subject: Re: rebellious pg stats collector (reopened case)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group