Which inner join syntax is more efficent?

olduncleamos_at_yahoo.com
Date: 09/11/04


Date: 11 Sep 2004 14:33:05 -0700

Hello all.

Assuming both TableA and TableB are roughly the same size with index
on COL_1 on both table. Which syntax will be more efficient?

SELECT A.Col_1, B.Col_2 FROM
TableA AS A INNER JOIN TableB AS B ON A.Col_1 = B.Col_1
WHERE A.Col_1 = @Some_Value

OR

SELECT A.Col_1, B.Col_2 FROM
TableA AS A INNER JOIN TableB AS B ON A.Col_1 = B.Col_1 AND A.Col_1 =
@Some_Value

Any help will be greatly appreciated.



Relevant Pages

  • Re: Cursors (again)
    ... What does it matter if TableB is temporary? ... or tableA. ... open cTableB ...
    (microsoft.public.sqlserver.programming)
  • Re: SQL: Working with huge tables of chronological data
    ... TableB is ~30 millions row and contains (timestamp, ... from tableA TA1 left outer join tableB TB on (TA1.timestamp < ... that portion of the plan was executed. ...
    (comp.databases.oracle.server)
  • Re: Dazed and Confused
    ... related to the records in TableB, *and* how EACH record in TableB is related ... to the records in TableA. ... Purchase Order Details Table to a Purchase Order Table ... Junction table to the Purchase Requisition table. ...
    (microsoft.public.access.tablesdbdesign)
  • Re: SQL: Working with huge tables of chronological data
    ... TableB is ~30 millions row and contains (timestamp, ... from tableA TA1 left outer join tableB TB on (TA1.timestamp < ... the predicate information for ID 9 come from? ...
    (comp.databases.oracle.server)
  • Re: Subselect Query Problem
    ... tableA LEFT JOIN tableB ... the result (of the inner join), it is logically re-introduced into the ... result, but since nothing match in tableB, whatever comes from tableB is ... > is Table B that has the first three fields as the primary key, ...
    (microsoft.public.access.queries)