| От | Alvaro Herrera |
|---|---|
| Тема | Re: Force specific index disuse |
| Дата | |
| Msg-id | 20140520190439.GJ7857@eldon.alvh.no-ip.org обсуждение |
| Ответ на | Re: Force specific index disuse (Steve Crawford <scrawford@pinpointresearch.com>) |
| Список | pgsql-general |
Steve Crawford wrote: > On 05/20/2014 10:44 AM, Alvaro Herrera wrote: > >If you can afford to lock the table for a while, the easiest is > > > >BEGIN; > >DROP INDEX bothersome_idx; > >EXPLAIN your_query; > >ROLLBACK; > > > Interesting. But what do you mean by "a while?" Does the above keep > the index intact (brief lock) or does it have to rebuild it on > rollback? Dropped relations are not deleted from disk until transaction commit, so the original index is kept intact, and when ROLLBACK is executed only catalog state changed by the DROP INDEX is "reverted," but it's an instant operation. -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера