pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: George Pavlov <gpavlov@mynewplace.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Not Picking Index
Date: Fri, 16 Feb 2007 14:27:47 -0500
Message-ID: <3481.1171654067@sss.pgh.pa.us> (raw)
In-Reply-To: <8C5B026B51B6854CBE88121DBF097A8684DA43@ehost010-33.exch010.intermedia.net>
References: <7e4ba9550702160456m6e86e809oc35dd68620348c80@mail.gmail.com>
	<20070216142804.GA44536@winnie.fuhr.org>
	<7e4ba9550702160631j5b428addr199bd87bd0704dc3@mail.gmail.com>
	<21263.1171637625@sss.pgh.pa.us>
	<8C5B026B51B6854CBE88121DBF097A8684DA43@ehost010-33.exch010.intermedia.net>

"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



view thread (10+ messages)

Message-ID: <3481.1171654067@sss.pgh.pa.us>
Permalink:  ../3481.1171654067@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3481.1171654067@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, gpavlov@mynewplace.com
  Subject: Re: Not Picking Index
  In-Reply-To: <3481.1171654067@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox