X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 15B0CD1B550 for ; Wed, 27 Aug 2003 09:18:58 -0300 (ADT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 83651-05 for ; Wed, 27 Aug 2003 09:18:50 -0300 (ADT) Received: from wolff.to (wolff.to [66.93.249.74]) by svr1.postgresql.org (Postfix) with SMTP id 81DADD1B914 for ; Wed, 27 Aug 2003 09:18:46 -0300 (ADT) Received: (qmail 25049 invoked by uid 500); 27 Aug 2003 12:24:46 -0000 Date: Wed, 27 Aug 2003 07:24:46 -0500 From: Bruno Wolff III To: Rhaoni Chiu Pereira Cc: pgsql-admin@postgresql.org Subject: Re: How to force an Index ? Message-ID: <20030827122446.GC25010@wolff.to> Mail-Followup-To: Rhaoni Chiu Pereira , pgsql-admin@postgresql.org References: <1061925116.3f4bb0fc641b2@www.sistemica.info> <20030826194558.GA19181@wolff.to> <1061930918.3f4bc7a63f7d6@www.sistemica.info> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1061930918.3f4bc7a63f7d6@www.sistemica.info> User-Agent: Mutt/1.5.4i X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/320 X-Sequence-Number: 10041 On Tue, Aug 26, 2003 at 17:48:38 -0300, Rhaoni Chiu Pereira wrote: > when I need for just one query a especific index to be used the only way is to > raise the costs ? There is no way to say to use a specific index. You can turn off some plans (and raise the cost of sequential scans, since that is sometimes the only way to do something) or you can adjust the relative costs of such things as cpu time and disk i/o. Making sure you have done an analyze and that you have detailed enough statistics for the planner is also important. P.S. You should keep replies on the list.