Re: Profiling Java Stored Procedures

From: Timur Akhmadeev <timur.akhmadeev_at_gmail.com>
Date: Wed, 18 Mar 2015 14:24:44 +0300
Message-ID: <CACGsLCKgSDOMJe1AdxqzdFng0r9ZV7x-MJus910bP=80fEcL_Q_at_mail.gmail.com>



Poor man's profiler (http://poormansprofiler.org/) approach could probably help. Just use oradebug dump short_stack to see the process stack trace & sample it.
Some guesswork after that will be required though as Oracle with recent versions compiles JSP with just in time compiler. Stack traces will not be user friendly I think.

On Tue, Mar 17, 2015 at 1:18 PM, Niall Litchfield < niall.litchfield_at_gmail.com> wrote:

> 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
>

-- 
Regards
Timur Akhmadeev

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Mar 18 2015 - 12:24:44 CET

Original text of this message