Disabling an index temporarily - Mailing list pgsql-hackers

From Tatsuo Ishii
Subject Disabling an index temporarily
Date
Msg-id 20151212.112536.1628974191058745674.t-ishii@sraoss.co.jp
Whole thread Raw
Responses Re: Disabling an index temporarily  ("Joshua D. Drake" <jd@commandprompt.com>)
List pgsql-hackers
Sometimes I need to repeat creating and dropping indexes while doing
an SQL tuning work. As you might know, creating a large index takes
long time. So dropping the index and re-creating it is pain and
counter productive.

What about inventing a new SET command something like:

SET disabled_index to <index-name>

This adds <index-name> to "disabled index list". The disabled index
list let the planner to disregard the indexes in the list.

SET enabled_index to <index-name>

This removes <index-name> from the disabled index list.

SHOW disabled_index

This shows the content of the disabled index list.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: strange CREATE INDEX tab completion cases
Next
From: Noah Misch
Date:
Subject: Re: Re: In-core regression tests for replication, cascading, archiving, PITR, etc.