Re: Question on REINDEX

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Bill Chandler <billybobc1210(at)yahoo(dot)com>
Cc: pgsql-perform <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Question on REINDEX
Date: 2005-04-18 19:33:56
Message-ID: 200504181233.56784.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Bill,

> 1) When is it necessary to run REINDEX or drop/create
> an index? All I could really find in the docs is:

If you need to VACUUM FULL, you need to REINDEX as well. For example, if you
drop millions of rows from a table.

> 2) If reindexing is necessary, how can this be done in
> a non-obtrusive way in a production environment. Our
> database is being updated constantly. REINDEX locks
> client apps out while in progress. Same with "CREATE
> INDEX" when we drop/create. The table can have over
> 10 million row. Recreating the indexes seems to take
> hours. This is too long to lock the client apps out.
> Is there any other solution?

Better to up your max_fsm_pages and do regular VACUUMs regularly and
frequently so that you don't have to REINDEX at all.

--
--Josh

Josh Berkus
Aglio Database Solutions
San Francisco

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2005-04-18 19:50:26 Re: immutable functions vs. join for lookups ?
Previous Message Bill Chandler 2005-04-18 19:27:08 Question on vacuumdb