May 18, 2004 at 9:09 pm
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 |
May 19, 2004 at 1:12 am
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
May 19, 2004 at 4:21 am
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