Deleting indexes before vacuum?

From: Matthew Hagerty <matthew(at)venux(dot)net>
To: pgsql-sql(at)postgreSQL(dot)org
Subject: Deleting indexes before vacuum?
Date: 1999-11-20 01:03:57
Message-ID: 4.1.19991119195147.00a16ef0@mail.venux.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 1999-11-20 06:14:25 Re: [SQL] Deleting indexes before vacuum?
Previous Message Tim Joyce 1999-11-19 22:55:48 Re: [SQL] selecting from indexes