Re: when to reindex? - Mailing list pgsql-general

From Kevin Hunter
Subject Re: when to reindex?
Date
Msg-id 48498B9F.2070602@earlham.edu
Whole thread Raw
In response to Re: when to reindex?  ("Roberts, Jon" <Jon.Roberts@asurion.com>)
Responses Re: when to reindex?
List pgsql-general
At 2:02p -0400 on Fri, 06 Jun 2008, Jon Roberts wrote:
> Based on this, I have the fillfactor set lower than the default 90 but
> this will fill up and it will run slower over time.  I want to automate
> the reindex process but only reindex when needed.  I have a pretty large
> database so I can't reindex everything regardless if it needs it or not.

Not knowing the core Postgres internals, this is perhaps a naive
question: would it be possible to engineer REINDEX so that it could do
the job in increments?  Rather than recreating the entire index at once,
say only create the index for 2% of the table?  I suppose analogous to a
partial index somehow?

Or, assuming the REINDEX is for speed/bloat, not for corruption, perhaps
an option to use the old index as a basis, rather than scanning the
entire table multiple times as with a CREATE INDEX CONCURRENTLY.

I do see REINDEX CONCURRENTLY on the TODO list though.  Not exactly the
same idea, but ...

Kevin

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Re: how to clean up temporary schemas (how to sync the system table with pg_dump)
Next
From: Gregory Stark
Date:
Subject: Re: Heavily fragmented table and index data in 8.0.3