Method and system for slow materialization of scrollable cursor result sets
View Patent ↗The present invention provides a system and a method for materializing records in a result set in response to a query. The computer system comprises a server and a client. The server has a database and a database management system for providing access to the database. The client is operatively coupled to the database management system. The client is adapted to provide a query to the database management system and the database management system is adapted to materialize a number of records in a result set in response to the query. The number of materialized records is selected to reduce inefficient materialization of records from the database in response to the query.
1. A method for materializing records in a result set in response to a query, said method comprising the steps of:
(a) generating a query from a client for requesting records from a database;
(b) generating a cursor for receiving and accessing said records that satisfy said query;
(c) issuing a command to retrieve said records to a database management system, said database management system managing said database, said command specifying a number of records to materialize that is less than or equal to the total number of records that satisfy said query;
(d) searching said database and materializing said specified number of records; and,
(e) returning said materialized records to said cursor for processing.
2. The method of claim 1 , wherein said number of records to materialize is selected according to the fashion in which said client scrolls through said materialized records.
3. The method of claim 1 , wherein said cursor generating step (b) further includes the step of (b 1 ) specifying that said database cursor is sensitive, static, scrollable and provides cursor stability for data isolation.
4. A computer program embodied in a computer readable medium, said computer program comprising computer instructions adapted to perform a method for materializing records in a result set in response to a query, said method comprising the steps of:
generating a query from a client for requesting records from a database;
generating a cursor for receiving and accessing said records that satisfy said query;
issuing a command to retrieve said records to a database management system, said database management system managing said database, said command specifying a number of records to materialize that is less than or equal to the total number of records that satisfy said query;
searching said database and materializing said specified number of records; and, returning said materialized records to said cursor for processing.
5. The computer program of claim 4 , wherein said number of records to materialize is selected according to the fashion in which said client scrolls through said materialized records.
6. The computer program of claim 5 , wherein generating said cursor includes specifying that said cursor is sensitive, static, scrollable and provides cursor stability for data isolation.