Java – Performance Comparison of Stored Procedure written in Pl/SQL vs. Java

javajava-stored-proceduresperformanceplsqlstored-procedures

After going through the discussion here I have one more question now.

Lets assume, there is an enterprise level application with million of user base and with millions of transaction each day. Performance vise, which would be better.

  1. Java Stored Procedure
  2. Or Oracle Stored Procedures (Pl/SQL)

P.S: When i say enterprise application development, I meant it from developers point of view where we have different layers of abstraction. Testing frameworks. Automated Testing deployed on multiple blades and extensive debugging etc

Best Answer

I suspect performance issues will come down to what kind of database operations you're doing. However a very important issue for me when dealing with databases is testability. Many times I've been in projects with are too centric around the database - where we end up with tons of business logic that I can't unit test, verify or perhaps even change.

I'm always for the pragmatic choice - everything in it's right place. And for some stuff you really should keep it in the database. But this is an issue worth thinking about.