Received: from neptuno.uevora.pt (neptuno.sc.uevora.pt [193.136.216.24]) by hub.org (8.9.3/8.9.3) with ESMTP id IAA25410 for ; Mon, 6 Dec 1999 08:50:21 -0500 (EST) (envelope-from mjnf@neptuno.sc.uevora.pt) Received: from neptuno.uevora.pt (really [127.0.0.1]) by neptuno.uevora.pt via smail with esmtp (ident mjnf using rfc1413) id (Debian Smail3.2.0.102) for ; Mon, 6 Dec 1999 13:49:39 +0000 (WET) Sender: mjnf Message-ID: <384BBEF2.B6CB6CDD@neptuno.uevora.pt> Date: Mon, 06 Dec 1999 13:49:38 +0000 From: Mario Jorge Nunes Filipe Reply-To: mjnf@uevora.pt Organization: Universidade de Evora X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.13 i686) X-Accept-Language: pt,en MIME-Version: 1.0 To: pgsql-sql@postgreSQL.org Subject: Re: [SQL] Wierd stuff References: <3254.944262032@sss.pgh.pa.us> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Tom Lane wrote: > Actually, I think that this may indeed be the root of the problem. > I killed several bugs in cross-data-type joins a while back ... for > example, IIRC pre-6.5 Postgres thought it could use hash joins for > cross-data-type equality operators, but that doesn't work properly in > general. Mario, what does EXPLAIN show about how the join query is > being done? First of all: sorry for the late reply, but with the weekend and all... To awnser your question... EXPLAIN shows this: sac=> explain select c.nome from aluno a, concelho c where sac-> a.concelho_naturalidade=c.codigo and a.numero_aluno=13792; NOTICE: QUERY PLAN: Hash Join (cost=27.44 size=164 width=18) -> Seq Scan on c (cost=13.16 size=308 width=16) -> Hash (cost=0.00 size=0 width=0) -> Index Scan on a (cost=2.05 size=2 width=2) EXPLAIN Upgrading at this point might be complicated, but sooner or later i will have to upgrade... -- Mario Filipe mjnf@uevora.pt http://neptuno.sc.uevora.pt/~mjnf