Re: Is there a way to temporarily disable a index
От
Michael Banck
Тема
Re: Is there a way to temporarily disable a index
Дата
Msg-id
20140711161206.GA5192@raptor.chemicalconnection.dyndns.org
Ответ на
Список
Дерево обсуждения
Is there a way to temporarily disable a index Benedikt Grundmann <bgrundmann@janestreet.com>
Re: Is there a way to temporarily disable a index David G Johnston <david.g.johnston@gmail.com>
Re: Is there a way to temporarily disable a index Tom Lane <tgl@sss.pgh.pa.us>
Re: Is there a way to temporarily disable a index Andres Freund <andres@2ndquadrant.com>
Re: Is there a way to temporarily disable a index Tom Lane <tgl@sss.pgh.pa.us>
Re: Is there a way to temporarily disable a index Andres Freund <andres@2ndquadrant.com>
Re: Is there a way to temporarily disable a index Tom Lane <tgl@sss.pgh.pa.us>
Re: Is there a way to temporarily disable a index Michael Banck <mbanck@gmx.net>
Re: Is there a way to temporarily disable a index David Johnston <david.g.johnston@gmail.com>
On Fri, Jul 11, 2014 at 11:07:21AM -0400, Tom Lane wrote: > David G Johnston writes: > > Benedikt Grundmann wrote > >> That is it possible to tell the planner that index is off limits > >> i.e. > >> don't ever generate a plan using it? > > > Catalog hacking could work but not recommended (nor do I know the > > proper > > commands and limitations). Do you need the database/table to accept > > writes > > during the testing period? > > Hacking pg_index.indisvalid could work, given a reasonably recent PG. > I would not try it in production until I'd tested it ;-) I wonder whether this should be exposed at the SQL level? Hacking pg_index is left to superusers, but the creator of an index (or the owner of the schema) might want to experiment with disabling indices while debugging query plans as well. Turns out this is already in the TODO, Steve Singer has requested this (in particular, "ALTER TABLE ... ENABLE|DISABLE INDEX ...") in http://www.postgresql.org/message-id/87hbegz5ir.fsf@cbbrowne.afilias-int.info (as linked to from the TODO wiki page), but the neighboring discussion was mostly about FK constraints. Thoughts? Michael
В списке pgsql-hackers по дате отправления
От: Tom Lane
Дата: