Re: Which inner join syntax is more efficent?

From: Hassan (fatima_ja_at_hotmail.com)
Date: 09/11/04


Date: Sat, 11 Sep 2004 14:59:44 -0700

I would look at the execution plan generated by both. I think they would
generate the same plan but i could be wrong

<olduncleamos@yahoo.com> wrote in message
news:83d5f6bf.0409111333.608cdf2b@posting.google.com...
> 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: Optimise multitable update
    ... >I have two fields on TableA that are the unique fields on TableB, ... Check the execution plan!! ...
    (microsoft.public.sqlserver.server)
  • Re: UDF/SP Editor
    ... I just wrote a UDF in QA and purposely wrote in some syntax ... executed a script to use the function, I got an error telling me there was a ... How is this better than EM's editor? ... Display Estimated Execution Plan ...
    (microsoft.public.sqlserver.programming)
  • Re: UPDATE query
    ... > I am struggling to get the syntax right for an UPDATE query with a ... hence wanting to do an UPDATE query. ... > UPDATE TableA SET ... > FROM (SELECT FieldA, FieldB from TableB). ...
    (microsoft.public.access.queries)
  • Re: Index Table
    ... > A) Select * From TableA ... >> The optimizer should create the same execution plan for both of these ... >>> Travis Tan ...
    (microsoft.public.sqlserver.datawarehouse)
  • Which inner join syntax is more efficent?
    ... Assuming both TableA and TableB are roughly the same size with index ... Which syntax will be more efficient? ... TableA AS A INNER JOIN TableB AS B ON A.Col_1 = B.Col_1 ...
    (microsoft.public.sqlserver.server)