Re: How often do I need to reindex tables?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bill Moran <wmoran(at)collaborativefusion(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How often do I need to reindex tables?
Date: 2007-03-02 06:26:37
Message-ID: 2373.1172816797@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Bill Moran <wmoran(at)collaborativefusion(dot)com> writes:
> Just an FYI ... I remembered what prompted the cron job.

> We were seeing significant performance degradation. I never did actual
> measurements, but it was on the order of "Bill, why is restoring taking
> such a long time?" from other systems people. At the time, I poked around
> and tried some stuff here and there and found that reindex restored
> performance. I didn't look at actual size at that time.

A reindex might improve performance for reasons other than bloat --- to
wit, that a freshly-built index is in perfect physical order, which
tends to get degraded over time by page splits. How important that is
depends on your usage patterns. If this is what the story is for your
situation, then what might fix it (in 8.2) is to create the index with
FILLFACTOR 50 or so, so that it's already at the steady state density
and won't need many page splits.

> Anyway, I'll report back in a few weeks as to what the numbers look like.

Yeah, please for the moment just watch what happens with the default
behavior.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2007-03-02 07:06:49 Re: [GENERAL] Fun with Cursors- how to rewind a cursor
Previous Message Postgres User 2007-03-02 06:20:40 Re: Add items to a record variable