Re: REINDEX slow?

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: REINDEX slow?
Дата
Msg-id 87ekqseg4e.fsf@stark.xeocode.com
обсуждение исходный текст
Ответ на Re: REINDEX slow?  (Edmund Dengler <edmundd@eSentire.com>)
Список pgsql-general
Edmund Dengler <edmundd@eSentire.com> writes:

> Alternatively, if I created a second index, and then dropped the first,
> would this be faster (though I would suppose that an ANALYZE would need to
> be done to recognize the utility of the new index, thereby negating any
> speed improvements)?

Currently analyze doesn't check what indexes exist, it analyzes all the
columns of the table anyways. However I think this won't be true in 7.5 when
there are expression indexes, and there has been talk of changing this in
future to take into account indexes and foreign keys.

I don't think it would be any faster but it might avoid downtime. Reindex
seems to block any use of the index until the reindex completes, while doing
this two-step would avoid blocking queries. I haven't tried it myself though
so I'm not sure what gotchas might arise.

--
greg

В списке pgsql-general по дате отправления:

Предыдущее
От: Christopher Browne
Дата:
Сообщение: Re: Data Encryption in PostgreSQL, and a Tutorial.
Следующее
От: Dennis Gearon
Дата:
Сообщение: specifics about BIT(n) types