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 A1D5C329D7F for ; Wed, 22 Sep 2004 14:43:37 +0100 (BST) 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 71491-03 for ; Wed, 22 Sep 2004 13:43:30 +0000 (GMT) Received: from stark.xeocode.com (gsstark.mtl.istop.com [66.11.160.162]) by svr1.postgresql.org (Postfix) with ESMTP id C18AF329D18 for ; Wed, 22 Sep 2004 14:43:32 +0100 (BST) Received: from localhost ([127.0.0.1] helo=stark.xeocode.com) by stark.xeocode.com with smtp (Exim 3.36 #1 (Debian)) id 1CA7P3-0002Ie-00; Wed, 22 Sep 2004 09:43:25 -0400 To: Gaetano Mendola Cc: Dennis Bjorklund , pgsql-performance@postgresql.org Subject: Re: 7.4 vs 7.3 ( hash join issue ) References: <4150B096.1050904@bigfoot.com> <4151362C.6070106@bigfoot.com> In-Reply-To: <4151362C.6070106@bigfoot.com> From: Greg Stark Organization: The Emacs Conspiracy; member since 1992 Date: 22 Sep 2004 09:43:24 -0400 Message-ID: <87y8j2ctc3.fsf@stark.xeocode.com> Lines: 18 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200409/215 X-Sequence-Number: 8343 Gaetano Mendola writes: > hash_join = on > -> Seq Scan on lookup_tipo_evento le (cost=0.00..1.16 rows=16 width=32) (actual time=0.017..0.038 rows=16 loops=1) > > hash_join = off > -> Seq Scan on lookup_tipo_evento le (cost=0.00..1.16 rows=16 width=32) (never executed) Actually this looks like it's arguably a bug to me. Why does the hash join execute the sequential scan at all? Shouldn't it also like the merge join recognize that the other hashed relation is empty and skip the sequential scan entirely? -- greg