X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 0305FD1D8AE for ; Thu, 11 Mar 2004 18:26:20 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 61387-06 for ; Thu, 11 Mar 2004 14:26:12 -0400 (AST) Received: from smtpout.mac.com (smtpout.mac.com [17.250.248.88]) by svr1.postgresql.org (Postfix) with ESMTP id 46763D1D332 for ; Thu, 11 Mar 2004 14:26:05 -0400 (AST) Received: from mac.com (smtpin07-en2 [10.13.10.152]) by smtpout.mac.com (Xserve/MantshX 2.0) with ESMTP id i2BIQA8p016802 for ; Thu, 11 Mar 2004 10:26:10 -0800 (PST) Received: from mac.com ([212.20.254.120]) (authenticated bits=0) by mac.com (Xserve/smtpin07/MantshX 3.0) with ESMTP id i2BIQ5AD012333 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Thu, 11 Mar 2004 10:26:10 -0800 (PST) Message-ID: <4050AF10.9060006@mac.com> Date: Thu, 11 Mar 2004 18:25:20 +0000 From: Mike Moran User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3b) Gecko/20030210 X-Accept-Language: en-us, en MIME-Version: 1.0 To: PgSQL Performance ML Subject: Impact of varchar/text in use of indexes Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200403/151 X-Sequence-Number: 6007 Hi. I have two existing tables, A and B. A has a 'varchar(1000)' field and B has a 'text' field, each with btree indexes defined. When I do a join between these, on this field, it seems to a hash join, as opposed to using the indexes, as I might expect (I'm no postgres expert, btw). My question is: if I changed both fields to be text or varchar(1000) then would the index be used? Ta, -- Mike