Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 49BC7633F5D for ; Fri, 22 May 2009 17:52:03 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 31263-04 for ; Fri, 22 May 2009 17:52:00 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from perseverance.services.encs.concordia.ca (perseverance-96.encs.concordia.ca [132.205.96.94]) by mail.postgresql.org (Postfix) with ESMTP id D7014633ED6 for ; Fri, 22 May 2009 17:52:00 -0300 (ADT) Received: from cacao.encs.concordia.ca (emilu@cacao.encs.concordia.ca [132.205.47.225]) by perseverance.services.encs.concordia.ca (envelope-from emilu@encs.concordia.ca) (8.13.7/8.13.7) with ESMTP id n4MKpxhg000633 for ; Fri, 22 May 2009 16:51:59 -0400 Message-ID: <4A17106F.7040302@encs.concordia.ca> Date: Fri, 22 May 2009 16:51:59 -0400 From: Emi Lu Reply-To: emilu@encs.concordia.ca User-Agent: Thunderbird 2.0.0.21 (X11/20090302) MIME-Version: 1.0 To: PostgreSQL SQL List Subject: left join where not null vs. inner join Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.58 on perseverance.encs.concordia.ca at 2009/05/22 16:51:59 EDT X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200905/102 X-Sequence-Number: 32594 Two tables, each contains more than hundreds of thousands records. Is there any efficiency differences between (1) and (2)? (1) T1 inner join T2 using (c1, c2) (2) T1 left join T2 using (c1, c2) where c2 is not null Thanks, -- Lu Ying