Re: Disable an index temporarily
От | Sergey Konoplev |
---|---|
Тема | Re: Disable an index temporarily |
Дата | |
Msg-id | CAL_0b1vza=T9DmLcg5kBgA1vgpRrZ-GBrMmEBG_FTj8-n5Zvug@mail.gmail.com обсуждение исходный текст |
Ответ на | Disable an index temporarily (Torsten Förtsch <torsten.foertsch@gmx.net>) |
Ответы |
Re: Disable an index temporarily
|
Список | pgsql-general |
On Apr 19, 2014 1:53 PM, "Torsten Förtsch" <torsten.foertsch@gmx.net> 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?
It works on a quick test, but I'm not sure how safe it is.
If you need to test a query without the index use a transaction:
Begin;
Drop index ...;
Explain ... select ...;
Rollback;
>
> Thanks,
> Torsten
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
В списке pgsql-general по дате отправления: