Friday, April 29, 2011

REF CURSOR versus TABLE function in Oracle

Hi,

I have PL-SQL Packages which return REF Cursors when data has to be retrieved as part of the CRUD operations. Would it be faster if these cursors were replaced with TABLE functions ?

Thanks

From stackoverflow
  • IMO TABLE functions is more usefull if you planned to use pipelined table functions. It`s not be faster, because REF is only reference to a memory. And all the work (parse, execute, fetch and etc.) will be processed out of the function that return REF Cursor. REF Cursors adds flexibility to the detriment of ease of support. That is another article from "MacLochlainns Weblog" about REF Cursors and pipelined functions - Reference Cursors - Why, when, and how?

0 comments:

Post a Comment