IP Library Granted Patent US 8,812,492
Granted Patent B2
US 8,812,492 · App. 13/330,860 · Granted Aug 19, 2014

Automatic and dynamic design of cache groups

Inventor: Joachim Klein (Hochspeyer, DE)
Assignee: Software AG
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 8,812,492
App. No.
13/330,860
Granted
Aug 19, 2014
Kind
B2
Abstract

A system and method is provided for automatic and dynamic adaptation of cache groups in a database system having one or more processors. The method includes analyzing a database query and determining if a set of predicates in a predicate pattern are suitable for inclusion in one or more cache groups, with the one or more cache groups having one or more cache tables; mapping value-based predicates in the predicate pattern to a filling column in the one or more cache tables; and mapping equi-join predicates in the predicate pattern to a referential cache constraint in the one or more cache tables. New cache groups can be created for predicate patterns occurring more frequently and existing cache groups can be deleted if the frequency of the predicate pattern falls below a predetermined threshold value.

Claims (50)

1. A method for automatic and dynamic adaptation of cache groups in a database system having one or more processors, the method comprising:

creating an anchored table set configured to hold one or more cache tables;

collecting value-based predicates in a database query;

creating a cache table for each value-based predicate and marking a filling column in each respective cache table;

adding each cache table to the anchored table set;

determining addable referential cache constraints between each cache table in the anchored table set;

determining costs for each addable referential cache constraint;

adding the referential cache constraint based on the determined cost of the respective referential cache constraint;

checking the cache tables in the anchored table set for heterogeneous cycles between tables; and

modifying referential cache constraints between cache tables when a heterogeneous cycle exists between cache tables, wherein

the determining of addable referential cache constraints, the determining of costs for each addable referential cache constraint, the adding of the referential cache constraint, the checking of the cache tables in the anchored table set, and the modifying of the referential cache constraints is repeated until all possible addable referential cache constraints have been exhausted, and

cache groups can be federated when the cache groups belong to a same predicate pattern and the cache groups can be prohibited from further federation when the cache groups belong to a different predicate pattern.

2. The method of claim 1 , further comprising determining a referential cache constraint having a minimal cost amongst each addable referential cache constraint.

3. The method of claim 2 , further comprising calculating a cost for a reverse of each addable referential cache constraint.

4. The method of claim 3 , further comprising calculating a switching cost for each addable referential cache constraint and its corresponding cost for the reverse of each addable referential cache constraint by subtracting the cost of each addable referential cache constraint from its corresponding cost for the reverse of each addable referential cache constraint.

5. The method of claim 4 , wherein the switching cost for each addable referential cache constraint is added to a priority list where the smaller switching costs have higher priority.

6. A non-transitory computer-readable storage medium having computer readable code embodied therein and capable of being stored in a memory as computer program instructions that, when executed by a computer having one or more processors, causes the computer to at least perform:

creating an anchored table set configured to hold one or more cache tables;

collecting value-based predicates in a database query;

creating a cache table for each value-based predicate and marking a filling column in each respective cache table;

adding each cache table to the anchored table set;

determining addable referential cache constraints between each cache table in the anchored table set;

determining costs for each addable referential cache constraint;

adding the referential cache constraint based on the determined cost of the respective referential cache constraint;

checking the cache tables in the anchored table set for heterogeneous cycles between tables; and

modifying referential cache constraints between cache tables when a heterogeneous cycle exists between cache tables, wherein

the determining of addable referential cache constraints, the determining of costs for each addable referential cache constraint, the adding of the referential cache constraint, the checking of the cache tables in the anchored table set, and the modifying of the referential cache constraints is repeated until all possible addable referential cache constraints have been exhausted, and

cache groups can be federated when the cache groups belong to a same predicate pattern and the cache groups can be prohibited from further federation when the cache groups belong to a different predicate pattern.

7. The non-transitory computer readable storage medium of claim 6 , further comprising determining a referential cache constraint having a minimal cost amongst each addable referential cache constraint.

8. The non-transitory computer readable storage medium of claim 7 , further comprising calculating a cost for a reverse of each addable referential cache constraint.

9. The non-transitory computer readable storage medium of claim 8 , further comprising calculating a switching cost for each addable referential cache constraint and its corresponding cost for the reverse of each addable referential cache constraint by subtracting the cost of each addable referential cache constraint from its corresponding cost for the reverse of each addable referential cache constraint.

10. The non-transitory computer readable storage medium of claim 9 , wherein the switching cost for each addable referential cache constraint is added to a priority list where the smaller switching costs have higher priority.

11. A database system, comprising:

a backend database having a memory and one or more processors and storing backend data; and

one or more cache instances having a memory and one or more processors and operatively communicating with the backend database, the one or more processors being configured to:

create an anchored table set configured to hold one or more cache tables;

collect value-based predicates in a database query;

create a cache table for each value-based predicate and marking a filling column in each respective cache table;

add each cache table to the anchored table set;

determine addable referential cache constraints between each cache table in the anchored table set;

determine costs for each addable referential cache constraint;

add the referential cache constraint based on the determined cost of the respective referential cache constraint;

check the cache tables in the anchored table set for heterogeneous cycles between tables; and

modify referential cache constraints between cache tables when a heterogeneous cycle exists between cache tables, wherein

the determining of addable referential cache constraints, the determining of costs for each addable referential cache constraint, the adding of the referential cache constraint, the checking of the cache tables in the anchored table set, and the modifying of the referential cache constraints is repeated until all possible addable referential cache constraints have been exhausted, and

cache groups can be federated when the cache groups belong to a same predicate pattern and the cache groups can be prohibited from further federation when the cache groups belong to a different predicate pattern.

12. The database system of claim 11 , wherein the one or more processors in the one or more cache instances are further configured to determine a referential cache constraint having a minimal cost amongst each addable referential cache constraint.

13. The database system of claim 12 , wherein the one or more processors in the one or more cache instances are further configured to calculate a cost for a reverse of each addable referential cache constraint.

14. The database system of claim 13 , wherein the one or more processors in the one or more cache instances are further configured to calculate a switching cost for each addable referential cache constraint and its corresponding cost for the reverse of each addable referential cache constraint by subtracting the cost of each addable referential cache constraint from its corresponding cost for the reverse of each addable referential cache constraint.

15. The database system of claim 14 , wherein the switching cost for each addable referential cache constraint is added to a priority list where the smaller switching costs have higher priority.

Assignments (3)
MERGER Recorded Dec 17, 2024
From: SOFTWARE AG
To: MOSEL BIDCO AG
Reel/Frame 069715/0235 →
CHANGE OF NAME Recorded Dec 17, 2024
From: MOSEL BIDCO AG
To: SOFTWARE GMBH
Reel/Frame 069715/0411 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 20, 2011
From: KLEIN, JOACHIM
To: SOFTWARE AG
Reel/Frame 027417/0224 →
Continuity (1)
Related Publication 20130159347A1 · Jun 20, 2013