X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id C7A2E9DC80A for ; Sun, 15 Jan 2006 19:48:17 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 88382-07 for ; Sun, 15 Jan 2006 19:48:20 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.mailpen.net (mail.mailpen.net [66.235.70.248]) by postgresql.org (Postfix) with ESMTP id 8368A9DC854 for ; Sun, 15 Jan 2006 19:48:15 -0400 (AST) Received: from athlon1.internal.mailpen.net (pool-71-113-18-74.sttlwa.dsl-w.verizon.net [71.113.18.74]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.mailpen.net (Postfix) with ESMTP id C3DAD17 for ; Sun, 15 Jan 2006 15:48:18 -0800 (PST) Received: from [192.168.128.199] (TpA22p1.internal.mailpen.net [192.168.128.199]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by athlon1.internal.mailpen.net (Postfix) with ESMTP id AA1876DC060 for ; Sun, 15 Jan 2006 15:48:17 -0800 (PST) Message-ID: <43CADF2C.7010100@ultimeth.com> Date: Sun, 15 Jan 2006 15:47:56 -0800 From: "Dean Gibson (DB Administrator)" Organization: UltiMeth Systems User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: pgsql-sql Subject: Re: What does "merge-joinable join conditions" mean ???? References: <43CAAFA6.6050001@ultimeth.com> <20060115215448.GA30809@winnie.fuhr.org> <43CACC78.7090107@ultimeth.com> <24299.1137367313@sss.pgh.pa.us> <43CADB44.70309@ultimeth.com> <24424.1137368560@sss.pgh.pa.us> In-Reply-To: <24424.1137368560@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.12 required=5 tests=[AWL=0.120] X-Spam-Score: 0.12 X-Spam-Level: X-Archive-Number: 200601/85 X-Sequence-Number: 23874 On 2006-01-15 15:42, Tom Lane wrote: > >> EXPLAIN SELECT count(*) FROM "Extra" FULL JOIN "GeoRestrict" ON >> callsign ~ pattern WHERE geo_region = >> 4; >> > > Oh, but that reduces it to a left join, as you can see in the EXPLAIN > output --- Yes, I previously noticed that in the EXPLAIN output too. > any null-extension rows from the right side are going to fail > the WHERE condition anyway, so the planner simplifies the FULL JOIN to a > LEFT JOIN. If you'd eliminate the WHERE altogether then the failure > will come back. > > Tried that, and you are right there as well. So, given the fact that the right-hand-table is only about 15 rows, do you think changing the SELECT back to a LEFT JOIN, and then using a UNION to get the extra right-hand-rows in, is the best work-around? -- Dean