Deleting indexes before vacuum? - Mailing list pgsql-sql

From Matthew Hagerty
Subject Deleting indexes before vacuum?
Date
Msg-id 4.1.19991119195147.00a16ef0@mail.venux.net
Whole thread Raw
Responses Re: [SQL] Deleting indexes before vacuum?
List pgsql-sql
Greetings,

I read a post sometime back where someone said their normal routine for
running a vacuum was to delete the indexes first, then recreate them after
the vacuum.  Is this necessary?  If the indexes are gone does vacuum
analyze still make sense?

I am concerned about this because I never removed the indexes prior to
vacuum, but today I executed this simple query:

select note_id from appnotes where note_id=6068;

note_id
------- 17768
(1 row)

This was rather alarming, so I deleted all the indexes, ran vacuum,
recreated the indexes.  Now the query works:

select note_id from appnotes where note_id=6068;

note_id
-------  6068
(1 row)

What are the general rules about running vacuum, frequency of use, etc.?

I am running pg-6.4 (I know it needs an update) on this particular server
and 6.5.x on others.

Thanks,
Matthew Hagerty


pgsql-sql by date:

Previous
From: "Tim Joyce"
Date:
Subject: Re: [SQL] selecting from indexes
Next
From: Tom Lane
Date:
Subject: Re: [SQL] Deleting indexes before vacuum?