Oracle: Having join or simple from/where clause has no affect on performance?

Elvin Source

My manger just told me that having joins or where clause in oracle query doesn't affect performance even when you have million records in each table. And I am just not satisfied with this and want to confirm that.
which of the following queries is better in performance on oracle and in postgresql also

1-

select a.name,b.salary,c.address 
    from a,b,c
    where a.id=b.id and a.id=c.id;

2-

select a.name,b.salary,c.address 
    from a
    JOIN b on a.id=b.id
    JOIN C on a.id=c.id;

I have tried Explain in postgresql for a small data set and query time was same (may be because I have just few rows) and right now I have no access to oracle and actual database to analyze the Explain in real envoirnment.

oraclepostgresqloracle11g

Answers

answered 5 years ago TeamDataViz. #1

  1. Using JOINS makes the code easier to read, since it's self-explanatory.

  2. In speed there is no difference (I have just tested it) and the execution plan is the same

  3. If the query optimizer is doing its job right, there should be no difference between those queries. They are just two ways to specify the same desired result.

comments powered by Disqus