Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Overhead of SQL to PL/SQL context switch using an inline function

CarlovskiOct 14 2009 — edited Oct 14 2009
Hi,
We have a bit of sql in a third party application that uses an inline pl/sql function to do some security checks.
These security checks are redundant in our system - we don't use the functionality so the result is always true, but the function is always called for each line of output, which is over a thousand for a lot of records.
The function itself is fairly lightweight in our environment - the tables it uses are empty so each iteration of the function is quite quick (about .1 of a second per query in total, vs 12-15 seconds for the 'main' query). What I was wondering if there is any way of measuring the overhead of just doing the function calls.
If I do a trace of the session I see the timings and cost of the 'main' sql query, and the breakdown of the 2 sql statements that have been called in the function (with over 1000 executions each) but is there any way to measure how much of the time to execute the main query is spent doing the context switch?

Regards,
Carl
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 11 2009
Added on Oct 14 2009
2 comments
772 views