Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id D04769FB487 for ; Fri, 16 Feb 2007 15:28:06 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 49872-05 for ; Fri, 16 Feb 2007 15:28:01 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 2B1BA9FBA0D for ; Fri, 16 Feb 2007 15:28:01 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id l1GJRmTJ003482; Fri, 16 Feb 2007 14:27:48 -0500 (EST) To: "George Pavlov" cc: pgsql-performance@postgresql.org Subject: Re: Not Picking Index 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> Comments: In-reply-to "George Pavlov" message dated "Fri, 16 Feb 2007 10:33:22 -0800" Date: Fri, 16 Feb 2007 14:27:47 -0500 Message-ID: <3481.1171654067@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.067 tagged_above=0 required=5 tests=AWL, BAYES_50, SPF_HELO_PASS, SPF_PASS X-Spam-Level: X-Archive-Number: 200702/191 X-Sequence-Number: 23245 "George Pavlov" 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