Deleting indexes before vacuum?

Поиск
Список
Период
Сортировка
От Matthew Hagerty
Тема Deleting indexes before vacuum?
Дата
Msg-id 4.1.19991119195147.00a16ef0@mail.venux.net
обсуждение исходный текст
Ответы Re: [SQL] Deleting indexes before vacuum?
Список 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 по дате отправления:

Предыдущее
От: "Tim Joyce"
Дата:
Сообщение: Re: [SQL] selecting from indexes
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [SQL] Deleting indexes before vacuum?