Cursors and SQL Areas (99)

tsinglee發表於2007-10-25

The application developer of an Oracle precompiler program or
OCI program can explicitly open cursors, or handles to specific private SQL areas, and
use them as a named resource throughout the execution of the program. Recursive
cursors that Oracle issues implicitly for some SQL statements also use shared SQL
areas.
The management of private SQL areas is the responsibility of the user process. The
allocation and deallocation of private SQL areas depends largely on which application
tool you are using, although the number of private SQL areas that a user process can
allocate is always limited by the initialization parameter OPEN_CURSORS. The default
value of this parameter is 50.
A private SQL area continues to exist until the corresponding cursor is closed or the
statement handle is freed. Although Oracle frees the runtime area after the statement
completes, the persistent area remains waiting. Application developers close all open
cursors that will not be used again to free the persistent area and to minimize the
amount of memory required for users of the application.

遊標與SQL區
1. 使用者程式可分配的最大私有SQL區受初始化引數OPEN_CURSORS的限制
2. 當相應的遊標被關閉或者語句控制程式碼被釋放時, 私有SQL區才消失
3. runtime area在SQL語句結束後釋放, persistent area則繼續等待(什麼?)

[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10599713/viewspace-978527/,如需轉載,請註明出處,否則將追究法律責任。

相關文章