Does a cursor store a SELECT result record-set in memory?

caching, database-cursor, oracle, plsql

Solution

A cursor is a pointer to that intermediate set of data returned from the query. It contains state information for producing and accessing the result. From the Concepts Doc:

A cursor is a name or handle to a specific private SQL area. As shown in Figure 14-5, you can think of a cursor as a pointer on the client side and as a state on the server side.

The result of a query is a `result set` and is pointed to by the cursor. It is stored in a temporary location, either in memory or on disk. From the concepts doc:

A temporary tablespace contains schema objects only for the duration of a session. Locally managed temporary tablespaces have temporary files (temp files), which are special files designed to store data in hash, sort, and other operations. Temp files also store result set data when insufficient space exists in memory.

Problem

From a book, I have read Whenever you perform a SQL statement, the Oracle opens an area of memory in which the command is parsed and executed. This area is called a cursor. It applies both to explicit and implicit cursors. But I'm curious about another thing - can a cursor be considered as a intermediate place (in memory) where Oracle returns final record set and uses it as a source for fetching records?

Original source