Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
472 views
in Technique[技术] by (71.8m points)

sql - Database: Pipelined Functions

I am new to the concept of Pipeline Functions. I have some questions regarding

From Database point of view:

  • What actually is Pipeline function ?
  • What is the advantage of using Pipeline Function ?
  • What challenges are solved using Pipeline Function ?
  • Are the any optimization advantages of using Pipeline Function ?

Thanks.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

To quote fom "Ask Tom Oracle":

pipelined functions are simply "code you can pretend is a database table"

pipelined functions give you the (amazing to me) ability to

select * from PLSQL_FUNCTION;

anytime you think you can use it -- to select * from a function, instead of a table, it might be "useful".

As far as advantages: a big advantage of using a Pipeline function is that your function can return rows one-by-one as opposed to building the entire result set in memory as a whole before returning it.

The above gives the obvious optimization - memory savings from something that would otherwise return big result set.

A fairly interesting example of using pipelined functions is here

What seems to be a good use of them is ETL (extract/transform/load) - for example see here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...