Re: Disable an index temporarily

Поиск
Список
Период
Сортировка
От Rajeev rastogi
Тема Re: Disable an index temporarily
Дата
Msg-id BF2827DCCE55594C8D7A8F7FFD3AB7713DDE2967@SZXEML508-MBX.china.huawei.com
обсуждение исходный текст
Ответ на Disable an index temporarily  (Torsten Förtsch <torsten.foertsch@gmx.net>)
Список pgsql-general
On 20 April 2014 02:21, Torsten Wrote:

> Hi,
>
> an index can be INVALID (pg_index.indisvalid=false).
>
> I want to temporarily disable an index so that it won't be used to
> access data but will still be updated.
>
> Can I simply set pg_index.indisvalid=false and later turn it true again?

I don't think there is any way to do so.

But If your intension is just to avoid index scan for some time, then you can use following command, which disable
indexscan 
        set enable_indexscan to off;
Once you are done with experimentation, you can execute command, which enable index scan.
        set enable_indexscan to on;

Thanks and Regards,
Kumar Rajeev Rastogi


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

Предыдущее
От: Fenn Bailey
Дата:
Сообщение: Re: Non-deterministic 100% CPU hang on postgres 9.3
Следующее
От: Rajeev rastogi
Дата:
Сообщение: Re: any way for a transaction to "see" inserts done earlier in the transaction?