Re: How to rebuild index efficiently

Поиск
Список
Период
Сортировка
От Ron
Тема Re: How to rebuild index efficiently
Дата
Msg-id e5ae6787-3f28-5afe-29db-8b19026f7e16@gmail.com
обсуждение исходный текст
Ответ на Re: How to rebuild index efficiently  (Christophe Pettus <xof@thebuild.com>)
Ответы Re: How to rebuild index efficiently  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-general
On 8/3/20 12:58 PM, Christophe Pettus wrote
>> On Aug 3, 2020, at 10:20, Konireddy Rajashekar <rajkonireddy@gmail.com> wrote:
>> Could you please suggest any ideal approach to tackle this ?
> You can do CREATE INDEX CONCURRENTLY to build a new index with the same definition, and when that is complete, drop
theold index.  The locking that is required here is modest: CREATE INDEX CONCURRENTLY needs to lock the table briefly
ata couple of points in the operation, and dropping the old index requires a brief lock on the table.  It is, however,
muchless overall lock time than REINDEX would be.
 

Of course, you need enough disk space... :)

-- 
Angular momentum makes the world go 'round.



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

Предыдущее
От: Christophe Pettus
Дата:
Сообщение: Re: How to rebuild index efficiently
Следующее
От: Michael Lewis
Дата:
Сообщение: Re: How to rebuild index efficiently