RE: PL/SQL in SQL (12c feature)

  • From: "McPeak, Matt" <vxsmimmcp@xxxxxxxxxx>
  • To: "fuzzy.graybeard@xxxxxxxxx" <fuzzy.graybeard@xxxxxxxxx>, "oracle-l@xxxxxxxxxxxxx" <oracle-l@xxxxxxxxxxxxx>
  • Date: Mon, 19 May 2014 14:56:37 +0000

I'd actually read that article, but I wasn't sure that Steve was saying that 
"inline-to-stored = context switch".  It seemed like he was just giving the 
background/use case of the new feature.

You are probably right, but I am still not sure.

Thanks,
Matt

-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx] On 
Behalf Of Hans Forbrich
Sent: Monday, May 19, 2014 10:41 AM
To: oracle-l@xxxxxxxxxxxxx
Subject: Re: PL/SQL in SQL (12c feature)

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

My question would be "how did they eliminate the context switch in the first 
place?"

/Hans
--
//www.freelists.org/webpage/oracle-l


--
//www.freelists.org/webpage/oracle-l


Other related posts: