At every company I have worked at, I have found that people are still writing their SQL queries in the ANSI-89 standard:
select a.id, b.id, b.address_1
from person a, address b
where a.id = b.id
rather than the ANSI-92 standard:
select a.id, b.id, b.address_1
from person a
inner join address b
on a.id = b.id
For an extremely simple query like this, there's not a big difference in readability, but for large queries I find that having my join criteria grouped in with listing out the table makes it much easier to see where I might have issues in my join, and let's me keep all my filtering in my WHERE clause. Not to mention that I feel that outer joins are much intuitive than the (+) syntax in Oracle.
As I try to evangelize ANSI-92 to people, are there any concrete performance benefits in using ANSI-92 over ANSI-89? I would try it on my own, but the Oracle setups we have here don't allow us to use EXPLAIN PLAN - wouldn't want people to try to optimize their code, would ya?
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…