Skip to Main Content
  • Questions
  • why ref cursor is inefficient that regular cursor

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Hanumantharao.

Asked: July 02, 2016 - 8:41 am UTC

Last updated: July 03, 2016 - 3:10 am UTC

Version: Oracle 11g

Viewed 1000+ times

You Asked

I have seen many posts and observed that Ref Cursors are inefficient when compared to Regular cursors.
it would be great if you explain me what happens internally and why ref cursors are inefficient than regular cursors.

and Connor said...

That is old advice.

There was a time in earlier versions, when dynamic SQL and ref cursor could not be cached as well as regular cursors. (PLSQL is very cool in that we take care of caching cursors to reduce parsing overheads).

But those differences have been resolved

eg

https://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:865497961356#17411636722415

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