On 19/05/2014 8:28 AM, McPeak, Matt wrote:
My question is: if an in-line PL/SQL function calls a stored PL/SQL function, does it all still execute without a context switch?From Steve Feuerstein's blog at http://www.oracle.com/technetwork/issue-archive/2013/13-sep/o53plsql-1999801.html
"This approach offers a way to both “extend” the SQL language with application-specific functionality and reuse (rather than copy) algorithms. A downside of user-defined function execution in SQL is that it involves a context switch between the SQL and PL/SQL execution engines."
and"So why would a developer want to copy logic from a PL/SQL function into a SQL statement? To improve performance. When I call my own PL/SQL function in a SQL statement, the SQL engine must perform a performance-affecting context switch to the PL/SQL engine. Moving the code inside the SQL statement means that that context switch no longer occurs."
It appears the context switch still occurs outside of the inline PL/SQLMy question would be "how did they eliminate the context switch in the first place?"
/Hans -- //www.freelists.org/webpage/oracle-l