Aggregate query-caching in databases architectures with a differential buffer and a main store
First Claim
1. A computer system for both online transaction processing and online analytical processing, comprising:
- a processor;
a database coupled to the processor, the database comprising;
a main store for storing records,a differential buffer for receiving and buffering added or deleted or modified records, the differential buffer being coupled to the main store,a schema comprising records stored in the main store and records stored in the differential buffer, anda cache store for caching a result of a query against the schema, wherein the query involves calculating an aggregate function; and
a cache controller executable by the processor and communicatively coupled to the database, the cache controller being configured for;
storing a result of the query in the cache store as a materialized aggregate;
receiving an analytical request; and
determining, in response to the received request, an up-to-date materialized aggregate by;
accessing the cache store to obtain the cached materialized aggregate;
determining the records of the schema that have been added or deleted or modified since the step of storing the cached result in the cache store on the basis of the records stored in the differential buffer; and
incrementally deriving the up-to-date materialized aggregate from the cached materialized aggregate and from the records determined in the previous step,wherein the cache controller is further configured for updating the cached materialized aggregate according to a merge update strategy, the merge update strategy comprising;
replacing the cached materialized aggregate in the cache store in response to the computer system initiating a merge of the records of the differential buffer into the main store, by;
accessing the cached query from the cache store during the merge;
determining the records of the schema that have been added or deleted or modified since the step of storing the cached result in the cache store on the basis of the records stored in the differential buffer;
incrementally deriving the up-to-date materialized aggregate from the cached materialized aggregate and from the records determined in the previous step; and
replacing the cached materialized aggregate in the cache store with the up-to-date materialized aggregate.
1 Assignment
0 Petitions
Accused Products
Abstract
The invention relates to a computer system for both online transaction processing and online analytical processing, comprising: a processor coupled to a database, the database comprising the database comprising: a main store (116) for storing records, a differential buffer (114) for receiving and buffering added or deleted or modified records, the differential buffer being coupled to the main store, a schema comprising records stored in the main store and records stored in the differential buffer, and a cache store (112) for caching a result of a query against the schema; and a cache controller (106) executable by the processor and communicatively coupled to the database, the cache controller being configured for: storing the result of the query in the cache store; receiving an analytical request; and determining, in response to the received request, an up-to-date result of the query by (216): accessing the cache store to obtain the cached result; determining the records of the schema that have been added or deleted or modified since the step of storing the cached result in the cache store on the basis of the records stored in the differential buffer; and incrementally deriving the up-to-date result from the cached result and from the records determined in the previous step.
15 Citations
13 Claims
-
1. A computer system for both online transaction processing and online analytical processing, comprising:
-
a processor; a database coupled to the processor, the database comprising; a main store for storing records, a differential buffer for receiving and buffering added or deleted or modified records, the differential buffer being coupled to the main store, a schema comprising records stored in the main store and records stored in the differential buffer, and a cache store for caching a result of a query against the schema, wherein the query involves calculating an aggregate function; and a cache controller executable by the processor and communicatively coupled to the database, the cache controller being configured for; storing a result of the query in the cache store as a materialized aggregate; receiving an analytical request; and determining, in response to the received request, an up-to-date materialized aggregate by; accessing the cache store to obtain the cached materialized aggregate; determining the records of the schema that have been added or deleted or modified since the step of storing the cached result in the cache store on the basis of the records stored in the differential buffer; and incrementally deriving the up-to-date materialized aggregate from the cached materialized aggregate and from the records determined in the previous step, wherein the cache controller is further configured for updating the cached materialized aggregate according to a merge update strategy, the merge update strategy comprising; replacing the cached materialized aggregate in the cache store in response to the computer system initiating a merge of the records of the differential buffer into the main store, by; accessing the cached query from the cache store during the merge; determining the records of the schema that have been added or deleted or modified since the step of storing the cached result in the cache store on the basis of the records stored in the differential buffer; incrementally deriving the up-to-date materialized aggregate from the cached materialized aggregate and from the records determined in the previous step; and replacing the cached materialized aggregate in the cache store with the up-to-date materialized aggregate. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
-
-
12. A method implemented in a computer system for both online transaction processing and online analytical processing, comprising the steps of:
-
providing the computer system that comprises; a processor; a database coupled to the processor, the database comprising; a main store for storing records, a differential buffer for receiving and buffering records, the differential buffer being coupled to the main store, a schema comprising records stored in the main store and records stored in the differential buffer, and a cache store for caching a result of a query against the schema, wherein the query involves calculating an aggregate function; and a cache controller executable by the processor and communicatively coupled to the database; and the cache controller performing the following steps; storing a result of the query in the cache store as a materialized aggregate; receiving an analytical request; and determining, in response to the received request, an up-to-date materialized aggregate by; accessing the cache store to obtain the cached materialized aggregate; determining the records of the schema that have been added or deleted or modified since the step of storing the cached result in the cache store on the basis of the records stored in the differential buffer; and incrementally deriving the up-to-date materialized aggregate from the cached materialized aggregate and from the records determined in the previous step, wherein the cache controller is further configured for updating the cached materialized aggregate according to a merge update strategy, the merge update strategy comprising; replacing the cached materialized aggregate in the cache store in response to the computer system initiating a merge of the records of the differential buffer into the main store, by; accessing the cached query from the cache store during the merge; determining the records of the schema that have been added or deleted or modified since the step of storing the cached result in the cache store on the basis of the records stored in the differential buffer; incrementally deriving the up-to-date materialized aggregate from the cached materialized aggregate and from the records determined in the previous step; and replacing the cached materialized aggregate in the cache store with the up-to-date materialized aggregate.
-
-
13. A non-transitory computer-readable medium comprising a plurality of machine-readable instructions that are executed by a computer system having one or more processors, the computer system including a processor, a database, and a cache controller, the database comprising a main store for storing records, a differential buffer for receiving and buffering records, a schema comprising records stored in the main store and records stored in the differential buffer, and a cache store for caching a result of a query against the schema, wherein the query involves calculating an aggregate function, and wherein the machine-readable instructions control the cache controller to perform the following steps:
-
storing a result of the query in the cache store as a materialized aggregate; receiving an analytical request; and determining, in response to the received request, an up-to-date materialized aggregate by; accessing the cache store to obtain the cached materialized aggregate; determining the records of the schema that have been added or deleted or modified since the step of storing the cached result in the cache store on the basis of the records stored in the differential buffer; and incrementally deriving the up-to-date materialized aggregate from the cached materialized aggregate and from the records determined in the previous step, wherein the cache controller is further configured for updating the cached materialized aggregate according to a merge update strategy, the merge update strategy comprising; replacing the cached materialized aggregate in the cache store in response to the computer system initiating a merge of the records of the differential buffer into the main store, by; accessing the cached query from the cache store during the merge; determining the records of the schema that have been added or deleted or modified since the step of storing the cached result in the cache store on the basis of the records stored in the differential buffer; incrementally deriving the up-to-date materialized aggregate from the cached materialized aggregate and from the records determined in the previous step; and replacing the cached materialized aggregate in the cache store with the up-to-date materialized aggregate.
-
Specification