Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Perfomance impact of join queries

Author  Topic 

mahendera
Starting Member

2 Posts

Posted - 2011-07-30 : 08:16:48
I just want to know any performance difference in below 2 queries

Select * from
Employee e
inner join Department d on e.department_id=d.department_id
where d.department_type='IT'

Select * from
Employee e
inner join Department d on e.department_id=d.department_id and d.department_type='IT'

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-07-30 : 08:18:37
did you try comparing the execution plans for both?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

mahendera
Starting Member

2 Posts

Posted - 2011-07-30 : 08:28:00
yes. but did not find any difference.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-07-30 : 08:33:40
then answer is obvious isnt it.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -