[Oracle] The lifecycle of a cursor

Last update on July 9, 2009 08:58 AM by jak58
Published by jak58

[Oracle] The lifecycle of a cursor






A good knowledge of the life cycle and the functioning of cursors will allow you to optimize applications running SQL queries.

The steps in the execution of a cursor are:


Opening a cursor: memory is allocated for the cursor in the private memory of the server process (on the server side) associated with the session (UGA User Global Area). Note that no SQL query is associated with the cursor for now.

Cursor path: an SQL query is associated with it. The representation of the route of the request, including its implementation plan, which describes how the SQL engine executes the SQL statement is loaded into the Shared Pool, in the library cache. The structure in the UGA is updated to store a pointer to the area associated with the cursor in the library cache.

Definition of output variables: the SQL query returns data, so the variables related to the must be defined. This definition is also required for DELETE, INSERT and UPDATE requests (using the RETURNING clause).

Linking input variables: if the SQL query uses variables, they must be provided. No verification is done at the link. If invalid values are passed, a runtime error will be triggered.

Execution of the cursor: at this stage, the SQL is executed. Depending on the database engine, the phase of actual implementation may be deferred at the time of fetch.

Fetch cursor (recovery of content): If the SQL query returns a result,it is recovered. In general it is at this stage that treatment occurs.

Closing the cursor: the cursor associated with the resources at the UGA are automatically released. The cursor in the library cache is not deleted in response to possible future uses.
Best answers for « The lifecycle of a cursor » in :
Software lifecycle Show Software lifecycle The term software lifecycle describes the development of an application, from the concept phase right up to the retirement phase. The purpose of such a plan is to define the various intermediate phases required to validate the...
Software lifecycle Show Software lifecycle The term software lifecycle describes the development of an application, from the concept phase right up to the retirement phase. The purpose of such a plan is to define the various intermediate phases required to the validate...
Change the appearance of the cursor in CSS Show Chance the appearance of yhe cursor with CSS The cursor property allow you to change the appearance of the cursor on an element of a web page. The client will automatically display the cursor on his computer that matches the type of...
Automatic alignment of the mouse cursor ShowAutomatic alignment of the mouse cursor To save time in Windows, when installing software for example, it is possible to ensure that the mouse is automatically positioned in the button selected by default. On Windows 2000 and Windows XP, you...
Connecting an iPhone/ IPOD TOUCH IN THE WIFI LIVEBOX ShowConnecting an iPhone/ IPOD TOUCH IN THE WIFI LIVEBOX iPod Setting Below is a tips of how to connect an iPod touch to the Livebox: iPod Setting • Go to Settings • Select WiFi • Move the cursor small WiFi to the right and...
Mouse or touch-pad acting erratically[Automatic clicking issue] ShowMouse or touch-pad acting erratically[Automatic clicking issue] Issue Solution Notes Issue An very annoying issue, when I was typing on my laptop my cursor would jump around or putting the mouse pointer over an icon will automatically...
Download Cursor Hider ShowCursor Hider is a tool which can be useful to you; this small program hides your mouse pointer so that you are not disturbed when reading a text for example. The mouse pointer disappears after one second from the working place and reappears just...
Download Download Statusbar ShowThis extension replaces the download windows of Firefox by using a discreet bar at the bottom of the screen. When putting the cursor on the top of a file, you view all information about it. This extension can display different information...
PLM (Product LifeCycle Management) ShowIntroduction to PLM Whereas Customer Relationship Management (CRM) tries to collect all information regarding clients, PLM (Product Lifecycle Management) consists in capitalizing on all information regarding an industrial product. PLM is an...
The mouse ShowIntroduction to the mouse The mouse is a pointing device used to move a cursor on the screen and allowing objects to be selected, moved and manipulated using the buttons. The consistent action of pressing (clicking) on a button in order to carry...