in reply to SQL JOINs vs WHERE statements

Just to throw my 2 cents in here...
  1. Yes, they are absolutely equivalent.
  2. I have never seen the verbose syntax (INNER|LEFT|RIGHT|FULL JOIN) used in a professional, production system, probably because Oracle prior to 9i didn't support it. (I had completely forgotten that it existed.)
  3. If you can limit one of the tables on an indexed column before joining, it may be faster. So in your example, if eps_people_roles.ep is indexed, you should do this:
    SELECT people.firstname, people.lastname, role.name FROM people, roles, eps_people_roles WHERE eps_people_roles.ep = 1 AND ( eps_people_roles.role = roles.id AND eps_people_roles.person = people.id )

Update
If you have the JOIN keyword available and it makes the query easier to read, by all means use it. It was added to SQL syntax for a reason...

Replies are listed 'Best First'.
Re: Re: SQL JOINs vs WHERE statements
by Cody Pendant (Prior) on Aug 19, 2003 at 00:05 UTC
    >If you can limit one of the tables on an >indexed column before joining, it may be faster.

    That's a helpful tip, thank you.



    ($_='kkvvttuubbooppuuiiffssqqffssmmiibbddllffss') =~y~b-v~a-z~s; print