| From: | Viktor Rosenfeld <rosenfel(at)informatik(dot)hu-berlin(dot)de> |
|---|---|
| To: | Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: temporarily deactivate an index |
| Date: | 2008-06-07 23:16:56 |
| Message-ID: | 3ABA495C-7773-426F-BFDC-67883EDD5CD9@informatik.hu-berlin.de |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Hi Scott,
Am 07.06.2008 um 16:53 schrieb Scott Marlowe:
>> I'm experimenting with different indexes to speed up my queries and
>> I was
>> wondering if it is possible to temporarily deactivate an index, so
>> it won't
>> be considered in the evaluation of query plans. The reason is that
>> dropping
>> and then rebuilding an index takes up time which I would rather not
>> wait.
>>
>> I couldn't find a command to do that, but I'm guessing that it
>> should be
>> possible by manipulating a structure in the catalog?
>
> Try this:
>
> begin;
> drop indexname;
> explain analyze select ...;
> rollback;
That works, but I'm still looking for another way to deactivate the
index. The reason being, that my query load is randomly generated by
a Java program and I don't want to go and change the SQL compiler.
Cheers,
Viktor
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Scott Marlowe | 2008-06-08 06:34:27 | Re: temporarily deactivate an index |
| Previous Message | Dennis Bjorklund | 2008-06-07 19:51:47 | Re: Extracting data from deprecated MONEY fields |