System and method for loading a cache with query results
First Claim
1. A computer-implemented method, comprising:
- receiving, from a local application program, a query request for objects stored in a remote database, a local cache being accessible to the local application program;
storing objects in the local cache while executing a query in response to the query request;
accessing the objects in the local cache using the local application program, whereby the application program is not required to access the database to retrieve the objects after query execution;
generating at least one query plan in response to the query request, wherein the query plan includes at least one query execution operator, the query plan being characterizable by a plan tree defining top and bottom; and
establishing at least one cache operator for the query plan, the cache operator including a first parameter specifying objects in an input stream to the operator to be copied into the cache and a second parameter specifying which data attributes to be passed through to a next operator in the query plan.
1 Assignment
0 Petitions
Accused Products
Abstract
A system and method for avoiding accessing a remote database twice, once during query execution and again to retrieve objects identified by the query, when an application requires objects on which to operate. During query plan generation in response to a request for database objects from an application, a query optimizer inserts cache operators into the candidate plans, and then a cost-benefit analysis is undertaken to identify the best plan. The best plan is then used to execute the query, with the cache operators causing objects identified during query execution to be cached locally to the requesting application as the query is being executed, thereby avoiding requiring the application to access the database after query execution.
-
Citations
18 Claims
-
1. A computer-implemented method, comprising:
-
receiving, from a local application program, a query request for objects stored in a remote database, a local cache being accessible to the local application program;
storing objects in the local cache while executing a query in response to the query request;
accessing the objects in the local cache using the local application program, whereby the application program is not required to access the database to retrieve the objects after query execution;
generating at least one query plan in response to the query request, wherein the query plan includes at least one query execution operator, the query plan being characterizable by a plan tree defining top and bottom; and
establishing at least one cache operator for the query plan, the cache operator including a first parameter specifying objects in an input stream to the operator to be copied into the cache and a second parameter specifying which data attributes to be passed through to a next operator in the query plan. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. A computer program device, comprising:
-
computer program storage device readable by a digital processing apparatus; and
a program on the program storage device and including instructions executions executable by the digital processing apparatus for performing method acts for caching objects in accordance with query results during query execution, the program comprising;
computer readable code means for receiving a query request for object from and application at a local computer site, the objects being stored in a database remote from the local site;
computer readable code means for generating at least one query plan to identify objects in the database satisfying the request;
computer readable code means for executing the query plan, wherein the query plan includes at least one query execution operator, the query plan being characterizable by a plan tree defining top and a bottom;
computer readable code means for causing at least some objects identified by the means for executing to be copied into a cache at the local computer site contemporaneously with the executing step undertaken by the means for executing, whereby the application program can access the objects in the cache without accessing the database after the query is executed; and
computer readable code means for establishing at least one cache operator for the query plan, the cache operator including a first parameter specifying objects in an input stream to the operator to be copied into the cache and a second parameter specifying which data attributes to be passed through to a next operator in the query plan. - View Dependent Claims (11, 12, 13, 14, 15, 16, 17, 18)
-
Specification