Profiling Java Stored Procedures

  • From: Niall Litchfield <niall.litchfield@xxxxxxxxx>
  • To: ORACLE-L <oracle-l@xxxxxxxxxxxxx>
  • Date: Tue, 17 Mar 2015 10:18:28 +0000

Morning/Afternoon/Evening all

We recently had a situation where a stored procedure was performing slowly
in one environment but quickly in a second. Naturally the dba looking at
this issue traced the session, only to discover that the time was all
attributed to an exec call for a stored procedure. It turns out that this
stored procedure is in fact a java stored procedure.

Is it possible to profile the execution of java stored procedures in the
same way that one can profile a pl/sql procedure. The documentation
suggests that it probably is, if the java class was compiled with debug
information (it probably wasn't).

Even better are there any reliable examples of this on the web that I could
look at.

FWIW this particular piece of code does some CPU intensive work that
doesn't modify data, so the choice of a JSP looks reasonable.

-- 
Niall Litchfield
Oracle DBA
http://www.orawin.info

Other related posts: