X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id DF75E8B9F5E for ; Wed, 9 Feb 2005 15:58:16 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 07543-09 for ; Wed, 9 Feb 2005 15:58:00 +0000 (GMT) Received: from mail.informatik.hu-berlin.de (mail.informatik.hu-berlin.de [141.20.20.50]) by svr1.postgresql.org (Postfix) with ESMTP id A9B5D8B9EA8 for ; Wed, 9 Feb 2005 15:58:02 +0000 (GMT) Received: from informatik.hu-berlin.de (karotte [141.20.27.143]) (authenticated bits=0) by mail.informatik.hu-berlin.de (8.12.10/8.12.10/INF-2.0-MA-SOLARIS-2.8) with ESMTP id j19Fw109009543 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 9 Feb 2005 16:58:02 +0100 (MET) Message-ID: <420A3309.5040507@informatik.hu-berlin.de> Date: Wed, 09 Feb 2005 16:58:01 +0100 From: Silke Trissl User-Agent: Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.4) Gecko/20030624 X-Accept-Language: de-at, de, en-us, en MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Tell postgres which index to use? Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200502/141 X-Sequence-Number: 10470 Hi, is there a way to tell Postgres which index to use when a query is issued in 7.4.2? I have a query for which costwise a Hash-Join and no Index-Usage is the best, but timewise using the index and then do a NestedLoop join is much better (3 - 4 times). I have vacuumed before I started the comparison, so Postgres does its best. And I don't constantly want to switch on and off the hashjoin and mergejoin. Regards, Silke Trissl