摘要 |
An apparatus, program product and method utilize policy-driven management of a pool of cursors in a database management system. Cursor usage statistics are determined for a plurality of cursors, and a plurality of cursor criteria defined in a policy are used to identify one or more cursors to close based upon the determined statistics. Among the statistics that are collected is a query time statistic that specifies, for each cursor, how long the query with which that cursor is associated, took to execute. As a result, a cursor that is associated with query that took a relatively longer time to execute will generally be less likely to be closed than a cursor that is associated with a query that took a relatively shorter time to execute. Consequently, should a cursor be needed for a particular query after the cursor has been closed, the performance penalty associated with recreating that cursor and its associated objects will be reduced.
|