X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.225.181]) by svr1.postgresql.org (Postfix) with ESMTP id E6427CDC3E for ; Fri, 11 Jul 2003 19:46:58 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr5.postgresql.org [64.117.225.181]) (amavisd-new, port 10024) with ESMTP id 22412-02 for ; Fri, 11 Jul 2003 19:46:22 +0000 (GMT) Received: from mail-3.zoominternet.net (unknown [63.67.120.25]) by svr1.postgresql.org (Postfix) with SMTP id 6167FCD7D1 for ; Fri, 11 Jul 2003 12:38:30 -0300 (ADT) Received: (qmail 25559 invoked from network); 11 Jul 2003 15:38:44 -0000 Received: from acs-24-154-209-142.zoominternet.net (HELO gmod.lajolla) ([24.154.209.142]) (envelope-sender ) by mail-3.zoominternet.net (qmail-ldap-1.03) with SMTP for ; 11 Jul 2003 15:38:44 -0000 Subject: Re: force the use of a particular index From: Scott Cain To: Tom Lane Cc: pgsql-performance@postgresql.org In-Reply-To: <11919.1057937041@sss.pgh.pa.us> References: <1057850280.1451.22.camel@localhost.localdomain> <11919.1057937041@sss.pgh.pa.us> Content-Type: text/plain Organization: Cold Spring Harbor Lab Message-Id: <1057937927.5766.21.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.0 Date: 11 Jul 2003 11:38:47 -0400 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/182 X-Sequence-Number: 2475 Hi Tom, Embarrassingly, I can't. I've been monkeying with the database so much that I can't seem to get it back to the state where I reproduce the behavior I want. A database drop and reload may be the only way, but since that is a time consuming thing to do, I won't be able to do it until this evening. Thanks, Scott On Fri, 2003-07-11 at 11:24, Tom Lane wrote: > Scott Cain writes: > > So, the question is, is there a way I can force the query planner to use > > the index I want it to use? > > No (and I don't think there should be). Given that it *can* generate > the plan you want, this is clearly an estimation failure. What is the > index it does use? Would you show us EXPLAIN ANALYZE results when > using each index? > > regards, tom lane -- ------------------------------------------------------------------------ Scott Cain, Ph. D. cain@cshl.org GMOD Coordinator (http://www.gmod.org/) 216-392-3087 Cold Spring Harbor Laboratory