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

From: McPeak, Matt <vxsmimmcp_at_subaru.com>
Date: Mon, 19 May 2014 14:56:37 +0000
Message-ID: <D7864FA3E7830B428CB2A5A5301B63EE0172317784_at_S7041VA005.soa.soaad.com>



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_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Hans Forbrich Sent: Monday, May 19, 2014 10:41 AM
To: oracle-l_at_freelists.org
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

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


--
http://www.freelists.org/webpage/oracle-l
Received on Mon May 19 2014 - 16:56:37 CEST

Original text of this message