Execution Plan

  • Hello,

    >

    > I have Just Some Queries in SQL 2000 That I Think They Can Be Better  and

    > Faster Done, If I Can Change Execution Plans For Them.

    >

    > e.g. It seems that some projections on Joined tables before joining them is

    > so good, but i think that Execution Plans don't do them.

    >

    > See This:

    >

    > 1)

    > select * from Table1 , Table 2

    > Where

    >      Table1.AnyField = Table2.AnyField

    >      And Table1.OtherField = Value1

    >

    > 2)

    > select * from Table1 , Table 2

    > Where

    >     Table1.OtherField = Value1

    >     and Table1.AnyField = Table2.AnyField

    >

    > Does Execution Plan, Make Different Plan for Those two Codes?

    > If So or not , What can I do?

    >

    >

    > Thanks

    > yadegari

  • No, there is no difference between the two.

    This is also easily checked - you can just run the two queries in QA and inspect the plans generated..

    /Kenneth

  • Even using the newer join syntax will produce the same execution plan for this query.

     

    select * from Table1

    Inner Join Table 2

    ON Table1.AnyField = Table2.AnyField

    Where 

    Table1.OtherField = Value1

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply