Java Stored Procedure Vs PL/SQL Stored Procedure

前端 未结 1 1471
孤街浪徒
孤街浪徒 2020-12-31 06:54

In Oracle DBMS, which is better performance, calling a java stored procedure from another pl/sql stored procedure or calling a pl/sql stored procedure from another pl/sql st

相关标签:
1条回答
  • 2020-12-31 07:48

    Any switch from one language to another will involve an overhead (it might be small but it'll still be there). If it's in a loop it will be accentuated.

    Keep it simple and if you can stick to PL/SQL then do so.

    Tom Kyte (Oracle Corporation Vice President and Guru) has a mantra which seems fitting to repeat here:

    (Reference: http://tkyte.blogspot.com/2006/10/slow-by-slow.html)

    • You should do it in a single SQL statement if at all possible.
    • If you cannot do it in a single SQL Statement, then do it in PL/SQL.
    • If you cannot do it in PL/SQL, try a Java Stored Procedure.
    • If you cannot do it in Java, do it in a C external procedure.
    • If you cannot do it in a C external routine, you might want to seriously think about why it is you need to do it…
    0 讨论(0)
提交回复
热议问题