Skip to Main Content
  • Questions
  • Difference between pipeline function and table function

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question.

Asked: April 26, 2016 - 8:57 am UTC

Last updated: April 26, 2016 - 5:47 pm UTC

Version: 10.0

Viewed 1000+ times

You Asked

Sir this is an interview question
*******************************

What is difference b/w pipelined function and Table function?Give me a practical example may be makes me full fill?

and Connor said...

Good description of pipeline/table functions here:

https://asktom.oracle.com/pls/asktom/f?p=100:11:::::P11_QUESTION_ID:19481671347143

In terms of difference, the term "pipeline" is meant to convey something similar to a unix pipe, that is, as data is produced it can be immediately consumed by the next step.

Let's say function F returns a collection.

Then

select * from table(f)

will wait until F has completely finished execution, and hence returned it collection, at which point we can apply the TABLE operator.

If F was a pipelined function, then as soon as F starts producing some rows (and piping them), then those rows are made available to the TABLE operator *even though* the function is *still* executing.

Hope this helps.

Is this answer out of date? If it is, please let us know via a Comment