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 39DA7D1C9AB for ; Tue, 18 Nov 2003 10:10:24 +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 96375-06 for ; Tue, 18 Nov 2003 06:09:54 -0400 (AST) Received: from stan.aopsys.com (m173.net81-64-15.noos.fr [81.64.15.173]) by svr1.postgresql.org (Postfix) with ESMTP id 58943D1B515 for ; Tue, 18 Nov 2003 06:09:51 -0400 (AST) Received: from localhost ([127.0.0.1] helo=news.nerim.net) by stan.aopsys.com with esmtp (Exim 3.36 #1 (Debian)) id 1AM2g8-00063z-00 for ; Tue, 18 Nov 2003 11:01:48 +0100 To: Subject: Join on incompatible types References: From: Laurent Martelli Date: Tue, 18 Nov 2003 11:01:48 +0100 In-Reply-To: (scott marlowe's message of "Wed, 29 Oct 2003 14:51:18 -0700 (MST)") Message-ID: <87k75ym1v7.fsf@news.nerim.net> User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/20.7 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/141 X-Sequence-Number: 4701 >>>>> "scott" == scott marlowe writes: [...] scott> Note here: scott> Merge Join (cost=1788.68..4735.71 rows=1 width=85) (actual scott> time=597.540..1340.526 rows=20153 loops=1) Merge Cond: scott> ("outer".id = "inner".id) scott> This estimate is WAY off. Are both of those fields indexed scott> and analyzed? Have you tried upping the statistics target on scott> those two fields? I assume they are compatible types. Should I understand that a join on incompatible types (such as integer and varchar) may lead to bad performances ? -- Laurent Martelli laurent@aopsys.com Java Aspect Components http://www.aopsys.com/ http://jac.aopsys.com