Re: disabling an index without deleting it?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: disabling an index without deleting it?
Дата
Msg-id 9050.1204064560@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: disabling an index without deleting it?  ("Joshua D. Drake" <jd@commandprompt.com>)
Ответы Re: disabling an index without deleting it?  ("Joshua D. Drake" <jd@commandprompt.com>)
Re: disabling an index without deleting it?  ("Markus Bertheau" <mbertheau.pg@googlemail.com>)
Re: disabling an index without deleting it?  (Jeff Davis <pgsql@j-davis.com>)
Список pgsql-performance
"Joshua D. Drake" <jd@commandprompt.com> writes:
> "Scott Marlowe" <scott.marlowe@gmail.com> wrote:
>> begin;
>> drop index abc_dx;
>> select ....
>> rollback;
>>
>> and viola, your index is still there.  note that there are likely some
>> locking issues with this, so be careful with it in production.  But on
>> a test box it's a very easy way to test various indexes.

> Wouldn't you also bloat the index?

No, what makes you think that?  The index won't change at all in the
above example.  The major problem is, as Scott says, that DROP INDEX
takes exclusive lock on the table so any other sessions will be locked
out of it for the duration of your test query.

            regards, tom lane

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

Предыдущее
От: Joel Stevenson
Дата:
Сообщение: Re: LISTEN / NOTIFY performance in 8.3
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: disabling an index without deleting it?