<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: PIPELINED PL/SQL function performance</title>
	<atom:link href="http://www.dannorris.com/2008/04/11/pipelined-plsql-function-performance/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dannorris.com/2008/04/11/pipelined-plsql-function-performance/</link>
	<description></description>
	<lastBuildDate>Fri, 12 Feb 2010 01:55:10 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Club Penguin Cheats</title>
		<link>http://www.dannorris.com/2008/04/11/pipelined-plsql-function-performance/comment-page-1/#comment-2832</link>
		<dc:creator>Club Penguin Cheats</dc:creator>
		<pubDate>Tue, 01 Sep 2009 10:56:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.dannorris.com/2008/04/11/pipelined-plsql-function-performance/#comment-2832</guid>
		<description>Mostly for Search Functions where the .NET code was attempting do do everything in one big SQL statement. Large performance gains were seen.&lt;br&gt;&lt;br&gt;I was very open with the developers and said they could have implemented the same logical solution in their language of choice, I prefer PL/SQL.</description>
		<content:encoded><![CDATA[<p>Mostly for Search Functions where the .NET code was attempting do do everything in one big SQL statement. Large performance gains were seen.</p>
<p>I was very open with the developers and said they could have implemented the same logical solution in their language of choice, I prefer PL/SQL.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://www.dannorris.com/2008/04/11/pipelined-plsql-function-performance/comment-page-1/#comment-1001</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Fri, 18 Apr 2008 23:33:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.dannorris.com/2008/04/11/pipelined-plsql-function-performance/#comment-1001</guid>
		<description>I saw Steven at Collaborate earlier this week and asked him about this. He mentioned that PIPELINED functions will almost always have a longer overall runtime as compared to non-PIPELINED table functions. 

To @Michael OShea&#039;s question, yes, a table function is any function that returns a collection. 

The benefits of a PIPELINED table function are that the client processing of rows from the function can be overlapped with the function&#039;s runtime, so the application can start doing something useful instead of waiting for the function to complete. I believe that the true &quot;power&quot; of PIPELINED functions are that they can be used in conjunction with parallelization which can be a real performance boost--however, I don&#039;t say that confidently as I haven&#039;t worked with them enough to know all those details. I requested that Steven follow up here when he has time, so hopefully we&#039;ll get some more expert input soon.</description>
		<content:encoded><![CDATA[<p>I saw Steven at Collaborate earlier this week and asked him about this. He mentioned that PIPELINED functions will almost always have a longer overall runtime as compared to non-PIPELINED table functions. </p>
<p>To @Michael OShea&#8217;s question, yes, a table function is any function that returns a collection. </p>
<p>The benefits of a PIPELINED table function are that the client processing of rows from the function can be overlapped with the function&#8217;s runtime, so the application can start doing something useful instead of waiting for the function to complete. I believe that the true &#8220;power&#8221; of PIPELINED functions are that they can be used in conjunction with parallelization which can be a real performance boost&#8211;however, I don&#8217;t say that confidently as I haven&#8217;t worked with them enough to know all those details. I requested that Steven follow up here when he has time, so hopefully we&#8217;ll get some more expert input soon.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Log Buffer #93: a Carnival of the Vanities for DBAs</title>
		<link>http://www.dannorris.com/2008/04/11/pipelined-plsql-function-performance/comment-page-1/#comment-1000</link>
		<dc:creator>Log Buffer #93: a Carnival of the Vanities for DBAs</dc:creator>
		<pubDate>Fri, 18 Apr 2008 17:17:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.dannorris.com/2008/04/11/pipelined-plsql-function-performance/#comment-1000</guid>
		<description>[...] Dan Norris offers a thorough examination of PIPELINED PL/SQL function performance. [...]</description>
		<content:encoded><![CDATA[<p>[...] Dan Norris offers a thorough examination of PIPELINED PL/SQL function performance. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael OShea</title>
		<link>http://www.dannorris.com/2008/04/11/pipelined-plsql-function-performance/comment-page-1/#comment-999</link>
		<dc:creator>Michael OShea</dc:creator>
		<pubDate>Tue, 15 Apr 2008 19:57:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.dannorris.com/2008/04/11/pipelined-plsql-function-performance/#comment-999</guid>
		<description>I think I&#039;m confused by the plethora of tables here. So is a table function just any function that returns a table type? But for a function to be used with the TABLE operator it must be pipelined? So a non-pipelined table function can only be used where its being called by PLSQL (as per dan&#039;s example), yes?</description>
		<content:encoded><![CDATA[<p>I think I&#8217;m confused by the plethora of tables here. So is a table function just any function that returns a table type? But for a function to be used with the TABLE operator it must be pipelined? So a non-pipelined table function can only be used where its being called by PLSQL (as per dan&#8217;s example), yes?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bradd Piontek</title>
		<link>http://www.dannorris.com/2008/04/11/pipelined-plsql-function-performance/comment-page-1/#comment-996</link>
		<dc:creator>Bradd Piontek</dc:creator>
		<pubDate>Tue, 15 Apr 2008 17:48:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.dannorris.com/2008/04/11/pipelined-plsql-function-performance/#comment-996</guid>
		<description>I am a bit confused about Steven&#039;s comment. I can&#039;t find any examples of non-pipelined table functions (table function and pipeline table function look to be synonymous). Maybe I&#039;m missing something.</description>
		<content:encoded><![CDATA[<p>I am a bit confused about Steven&#8217;s comment. I can&#8217;t find any examples of non-pipelined table functions (table function and pipeline table function look to be synonymous). Maybe I&#8217;m missing something.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://www.dannorris.com/2008/04/11/pipelined-plsql-function-performance/comment-page-1/#comment-995</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Tue, 15 Apr 2008 06:00:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.dannorris.com/2008/04/11/pipelined-plsql-function-performance/#comment-995</guid>
		<description>Hi Bradd,

I was a bit surprised by the numbers as well and that&#039;s why I decided to come out of blog-hiding and write it up. I suppose some of the &quot;less interesting&quot; results would have made good blog material too, but I don&#039;t seem to be able to form blogging habits very well. Anyway, thanks for your comments and I would love to hear how your testing goes--especially if the results are different than mine.</description>
		<content:encoded><![CDATA[<p>Hi Bradd,</p>
<p>I was a bit surprised by the numbers as well and that&#8217;s why I decided to come out of blog-hiding and write it up. I suppose some of the &#8220;less interesting&#8221; results would have made good blog material too, but I don&#8217;t seem to be able to form blogging habits very well. Anyway, thanks for your comments and I would love to hear how your testing goes&#8211;especially if the results are different than mine.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bradd Piontek</title>
		<link>http://www.dannorris.com/2008/04/11/pipelined-plsql-function-performance/comment-page-1/#comment-994</link>
		<dc:creator>Bradd Piontek</dc:creator>
		<pubDate>Tue, 15 Apr 2008 01:49:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.dannorris.com/2008/04/11/pipelined-plsql-function-performance/#comment-994</guid>
		<description>Dan,
   Excellent test case. I&#039;ve been pushing Table Function and Pipelined Functions on an internal application that launched a few weeks ago. Mostly for Search Functions where the .NET code was attempting do do everything in one big SQL statement. Large performance gains were seen. (I was very open with the developers and said they could have implemented the same logical solution in their language of choice, I prefer PL/SQL). 

Regardless, I&#039;m intrigued by your numbers and may start doing some performance numbers between a Pipelined table-function (what I had the developers implement) and a regular table-functions.</description>
		<content:encoded><![CDATA[<p>Dan,<br />
   Excellent test case. I&#8217;ve been pushing Table Function and Pipelined Functions on an internal application that launched a few weeks ago. Mostly for Search Functions where the .NET code was attempting do do everything in one big SQL statement. Large performance gains were seen. (I was very open with the developers and said they could have implemented the same logical solution in their language of choice, I prefer PL/SQL). </p>
<p>Regardless, I&#8217;m intrigued by your numbers and may start doing some performance numbers between a Pipelined table-function (what I had the developers implement) and a regular table-functions.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://www.dannorris.com/2008/04/11/pipelined-plsql-function-performance/comment-page-1/#comment-992</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Sun, 13 Apr 2008 14:39:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.dannorris.com/2008/04/11/pipelined-plsql-function-performance/#comment-992</guid>
		<description>Hi Steven,

I didn&#039;t get in to the reasons why the customer had originally used PF, but for them, I don&#039;t think it was as much about the processing time (since the complete record set was only about 30-40 rows). In this case, they had several different queries that needed to run, but they wouldn&#039;t know which queries to run until runtime. So, it was relatively easy for them to just run a query and PIPE the rows out at runtime. For my test, I just added those rows to a collection and then returned the whole collection at the end. 

Either way, I found this interesting and I&#039;m grateful that you stopped by to comment!</description>
		<content:encoded><![CDATA[<p>Hi Steven,</p>
<p>I didn&#8217;t get in to the reasons why the customer had originally used PF, but for them, I don&#8217;t think it was as much about the processing time (since the complete record set was only about 30-40 rows). In this case, they had several different queries that needed to run, but they wouldn&#8217;t know which queries to run until runtime. So, it was relatively easy for them to just run a query and PIPE the rows out at runtime. For my test, I just added those rows to a collection and then returned the whole collection at the end. </p>
<p>Either way, I found this interesting and I&#8217;m grateful that you stopped by to comment!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steven Feuerstein</title>
		<link>http://www.dannorris.com/2008/04/11/pipelined-plsql-function-performance/comment-page-1/#comment-981</link>
		<dc:creator>Steven Feuerstein</dc:creator>
		<pubDate>Sat, 12 Apr 2008 22:25:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.dannorris.com/2008/04/11/pipelined-plsql-function-performance/#comment-981</guid>
		<description>Dan,

I am glad to see you talking about pipelined functions; it is a feature of PL/SQL that is unfamiliar to most developers.

One thing I have noticed from my trainings regarding pipelined functions, however, is that PL/SQL developers seem to use them when what they really mean to use is a table function.

A table function is a function that can be called in the FROM clause of a query, and that fact offers all sorts of tantalizing possibilities. Generally, you can hide complex transformations inside a function&#039;s body and expose the result as nothing more than rows and columns in a query.

A pipelined function is a specialized form of the table function that returns data back to the calling query (it must be called inside a query) while the function is still executing.

A pipelined function will not reduce the total elapsed time of a function&#039;s execution; in fact, in my experience non-pipelined table functions often perform a little bit faster than their pipelined equivalent.

The special thing about the PF is that the calling query can start using data from the function before it has processed all its data - and this means that you can reduce the perceived elapsed time to the user (a webpage built around a PF can display the first 100 rows while the next 10,000 are being retrieved) as well as parallelize execution of table functions.

So...don&#039;t use a pipelined function unless you actually need its special properties!

Steven Feuerstein
www.ToadWorld.com/SF</description>
		<content:encoded><![CDATA[<p>Dan,</p>
<p>I am glad to see you talking about pipelined functions; it is a feature of PL/SQL that is unfamiliar to most developers.</p>
<p>One thing I have noticed from my trainings regarding pipelined functions, however, is that PL/SQL developers seem to use them when what they really mean to use is a table function.</p>
<p>A table function is a function that can be called in the FROM clause of a query, and that fact offers all sorts of tantalizing possibilities. Generally, you can hide complex transformations inside a function&#8217;s body and expose the result as nothing more than rows and columns in a query.</p>
<p>A pipelined function is a specialized form of the table function that returns data back to the calling query (it must be called inside a query) while the function is still executing.</p>
<p>A pipelined function will not reduce the total elapsed time of a function&#8217;s execution; in fact, in my experience non-pipelined table functions often perform a little bit faster than their pipelined equivalent.</p>
<p>The special thing about the PF is that the calling query can start using data from the function before it has processed all its data &#8211; and this means that you can reduce the perceived elapsed time to the user (a webpage built around a PF can display the first 100 rows while the next 10,000 are being retrieved) as well as parallelize execution of table functions.</p>
<p>So&#8230;don&#8217;t use a pipelined function unless you actually need its special properties!</p>
<p>Steven Feuerstein<br />
<a href="http://www.ToadWorld.com/SF" rel="nofollow">http://www.ToadWorld.com/SF</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
