Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 4A6449FA298 for ; Mon, 30 Oct 2006 08:28:43 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 97563-03 for ; Mon, 30 Oct 2006 08:28:37 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from cassarossa.samfundet.no (cassarossa.samfundet.no [129.241.93.19]) by postgresql.org (Postfix) with ESMTP id 28AF59FA0C0 for ; Mon, 30 Oct 2006 08:28:34 -0400 (AST) Received: from trofast.sesse.net ([129.241.93.32]) by cassarossa.samfundet.no with esmtp (Exim 4.50) id 1GeWFk-0007fL-C3; Mon, 30 Oct 2006 13:28:32 +0100 Received: from sesse by trofast.sesse.net with local (Exim 3.36 #1 (Debian)) id 1GeWEn-0001fI-00; Mon, 30 Oct 2006 13:27:33 +0100 Date: Mon, 30 Oct 2006 13:27:33 +0100 From: "Steinar H. Gunderson" To: Mattias Kregert Cc: pgsql-performance@postgresql.org Subject: Re: Strange plan in pg 8.1.0 Message-ID: <20061030122733.GA6357@uio.no> Mail-Followup-To: Mattias Kregert , pgsql-performance@postgresql.org References: <200610301205.08087.mattias@kregert.se> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <200610301205.08087.mattias@kregert.se> X-Operating-System: Linux 2.6.17.11 on a x86_64 X-Message-Flag: Outlook? --> http://www.mozilla.org/products/thunderbird/ User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=BAYES_50 X-Spam-Level: X-Archive-Number: 200610/608 X-Sequence-Number: 21737 On Mon, Oct 30, 2006 at 01:05:07PM +0200, Mattias Kregert wrote: > -> Hash Left Join (cost=59.66..206763.11 rows=1215336 width=27) (actual time=4.959..3228.550 rows=1216434 loops=1) > Hash Cond: (("outer".prislista = ("inner".listid)::text) AND ("outer".tjanst = ("inner".tjanstid)::text)) Note the conversion to text here. Are you sure the types are matching on both sides of the join? /* Steinar */ -- Homepage: http://www.sesse.net/