is NATURAL JOIN any better than SELECT FROM WHERE in terms of performance ?
Posted
by ashy_32bit
on Stack Overflow
See other posts from Stack Overflow
or by ashy_32bit
Published on 2010-06-17T15:28:49Z
Indexed on
2010/06/17
15:33 UTC
Read the original article
Hit count: 153
Today I got into a debate with my project manager about Cartesian products. He says a 'natural join' is somehow much better than using 'select from where' because the later cause the db engine to internally perform a Cartesian product but the former uses another approach that prevents this. As far as I know, the natural join syntax is not any different in anyway than 'select from where' in terms of performance or meaning, I mean you can use either based on your taste.
SELECT * FROM table1,table2 WHERE table1.id=table2.id SELECT * FROM table1 NATURAL JOIN table2
please elaborate about the first query causing a Cartesian product but the second one being somehow more smart
© Stack Overflow or respective owner