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