Overhead of SQL to PL/SQL context switch using an inline function
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