Re: Not Picking Index - Mailing list pgsql-performance

From Tom Lane
Subject Re: Not Picking Index
Date
Msg-id 3481.1171654067@sss.pgh.pa.us
Whole thread Raw
In response to Re: Not Picking Index  ("George Pavlov" <gpavlov@mynewplace.com>)
List pgsql-performance
"George Pavlov" <gpavlov@mynewplace.com> writes:
>> In PG 8.2 and up there is a sneakier way to do it that won't acquire
>> any more lock than the statement-under-test does:
>>
>> begin;
>> update pg_index set indisvalid = false
>> where indexrelid = 'soandso'::regclass;
>> explain analyze ...;
>> rollback;

> this really smacks of that four-letter word that starts with h... -- i
> am glad we have finally come around on the subject :-)

indisvalid isn't a hint; it was necessary to make CREATE INDEX CONCURRENTLY
work.  But if you want to (mis?)use it as a hint, you can ...

            regards, tom lane

pgsql-performance by date:

Previous
From: Mark Stosberg
Date:
Subject: Re: reindex vs 'analyze'
Next
From: Andreas Tille
Date:
Subject: How to debug performance problems