SQLTeam.com | Weblogs | Forums

Select with inner join will be faster?


#1

hi all,

i have a question about how to improve the speed of select query?

select * from tableA A inner join tableB B on a.ID = B.ID

select * from tableA A, tableB B where A.ID = B.ID

may i know which 1 is faster?
is it inner join will be faster?


#2

The query optimizer will convert either form to the same query plan, so it really doesn't matter. However, INNER JOIN is a more clear and modern way to express that relationship, and will be more explicit to other programmers. And if you need to add additional conditions in a WHERE clause (e.g. for parameters) you can maintain a logical separation more easily.