Tom大师关于oracle优化的经典法则

来源:互联网 发布:sql中select什么意思 编辑:程序博客网 时间:2024/06/10 08:28

• You should do it in a single SQL statement if at all possible. And believe it or not, it
is almost always possible.
• If you can’t do it in a single SQL Statement, do it in PL/SQL—as little PL/SQL as
possible! Follow the saying that goes “more code = more bugs, less code = less
bugs.”
• If you can’t do it in PL/SQL, try a Java stored procedure. The times this is
necessary are extremely rare nowadays with Oracle9i and above.
• If you can’t do it in Java, do it in a C external procedure. This is most frequently
the approach when raw speed or using a third-party API written in C is needed.
• If you can’t do it in a C external routine, you might want to seriously think about
why it is you need to do it