# US 12,008,041 B2 · Shared cache for multiple index services in nonrelational databases

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 12,008,041 B2
- Document ID: US12008041B2
- Status: Granted
- Kind: B2
- Application number: 17/475,601
- Filed: 2021-09-15
- Published: 2023-03-16
- Granted: 2024-06-11
- Earliest claimed: 2021-09-15
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Peng Hui Jiang; Xing Xing Shen; Guang Han Sui; Jun Su; Hai Ling Zhang
- Web page: https://patentgrep.com/patent/US12008041B2

## CPC

- G06F 16/9027: {Trees}
- G06F 12/0891: using clearing, invalidating or resetting means
- G06F 16/24552: {Database cache management}
- G06F 16/90335: {Query processing}
- G06F 12/0842: for multiprocessing or multitasking
- G06F 12/121: using replacement algorithms
- G06F 2212/1024: Latency reduction
- G06F 2212/154: Networked environment
- G06F 2212/163: Server or database system
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A computer-implemented method includes receiving, by a processing unit, from a first tenant, a query to retrieve data from a nonrelational database system. The method further includes determining, by the processing unit, that an index associated with the query is cached in a shared index cache, wherein the shared index cache stores indexes for a plurality of tenants. The method further includes retrieving, by the processing unit, a result of the query based on the index in the shared index cache. The method further includes outputting, by the processing unit, the result of the query.

## Claims

### Claim 1

A computer-implemented method comprising:
receiving, by a processing unit, from a first tenant, a query to retrieve data from a nonrelational database system;
accessing, applying the processing unit, an index storage containing a shared index cache and a plurality of cache indexes, wherein each cache index of the plurality of cache indexes corresponds to a tenant in a plurality of tenants and the each cache index of the plurality of cache indexes further comprises an individual index specific to the corresponding tenant and a reference to the shared index cache and
determining, by the processing unit, that the index associated with the query is cached in the individual index cache that is specific to the first tenant when the index associated with the query is cached in the individual index cache;
responding to a cache penetration of the individual index cache that is specific to the first tenant by determining, by the processing unit, that the index associated with the query is cached in the shared index cache, wherein the shared index cache stores indexes for the plurality of tenants, when the index associated with the query is not cached in the individual index cache that is specific to the first tenant and the index associated with the query is cached in the shared index cache;
retrieving, by the processing unit, the result of the query based on the index in the individual index cache when the index associated with the query is stored in the individual index cache that is specific to the first tenant;
retrieving, by the processing unit, a result of the query based on the index in the shared index cache when the index associated with the query is not stored in the individual index cache that is specific to the first tenant; and
outputting, by the processing unit, the result of the query.

### Claim 2 (depends on 1)

The computer-implemented method of claim 1, wherein the shared index cache is updated at a predetermined frequency.

### Claim 3 (depends on 1)

The computer-implemented method of claim 1, wherein the shared index cache is updated in response to the shared index cache being full.

### Claim 4 (depends on 1)

The computer-implemented method of claim 1, wherein updating the shared index cache comprises determining a first index from the shared index cache that is to be evicted.

### Claim 5 (depends on 4)

The computer-implemented method of claim 4, wherein updating the shared index cache further comprises determining a second index from the index storage to replace the first index in the shared index cache.

### Claim 6 (depends on 1)

The computer-implemented method of claim 1, wherein, in response to the index not being present in the shared index cache, identifying the index in the index storage, wherein the index storage has a higher latency to retrieve the index than the shared index cache.

### Claim 7

A system comprising:
an index storage comprising a plurality of indexes for a nonrelational database system, the index storage containing a shared index cache and a plurality of cache indexes, wherein each cache index of the plurality of cache indexes corresponds to a tenant in a plurality of tenants and the each cache index of the plurality of cache indexes further comprises an individual index specific to the corresponding tenant and a reference to the shared index cache; and
one or more processors coupled with the index storage, the one or more processors configured to perform a method comprising:
receiving from a first tenant of the plurality of tenants, a query to retrieve data from the nonrelational database system;
accessing the index storage containing the shared index cache and the plurality of cache indexes, wherein the each cache index of the plurality of cache indexes corresponds to the tenant in the plurality of tenants and the each cache index of the plurality of cache indexes further comprises the individual index specific to the corresponding tenant and the reference to the shared index cache and
determining that the index associated with the query is cached in the individual index cache that is specific to the first tenant when the index associated with the query is cached in the individual index cache;
responding to a cache penetration of the individual index cache that is specific to the first tenant by determining that the index associated with the query is cached in the shared index cache, wherein the shared index cache stores indexes for the plurality of tenants, when the index associated with the query is not cached in the individual index cache that is specific to the first tenant and the index associated with the query is cached in the shared index cache;
retrieving the result of the query based on the index in the individual index cache when the index associated with the query is stored in the individual index cache that is specific to the first tenant;
retrieving a result of the query based on the index in the shared index cache when the index associated with the query is not stored in the individual index cache that is specific to the first tenant; and
outputting the result of the query.

### Claim 8 (depends on 7)

The system of claim 7, wherein the shared index cache is updated at a predetermined frequency.

### Claim 9 (depends on 7)

The system of claim 7, wherein the shared index cache is updated in response to the shared index cache being full.

### Claim 10 (depends on 7)

The system of claim 7, wherein updating the shared index cache comprises determining a first index from the shared index cache that is to be evicted.

### Claim 11 (depends on 10)

The system of claim 10, wherein updating the shared index cache further comprises determining a second index from the index storage to replace the first index in the shared index cache.

### Claim 12 (depends on 7)

The system of claim 7, wherein, in response to the index not being present in the shared index cache, identifying the index in the index storage, wherein the index storage has a higher latency to retrieve the index than the shared index cache.

### Claim 13

A computer program product comprising a computer-readable storage medium that has computer-executable instructions stored thereupon, the computer-executable instructions when executed by a processor cause the processor to perform a method comprising:
receiving from a first tenant, a query to retrieve data from a nonrelational database system;
accessing an index storage containing a shared index cache and a plurality of cache indexes, wherein each cache index of the plurality of cache indexes corresponds to a tenant in a plurality of tenants and the each cache index of the plurality of cache indexes further comprises an individual index specific to the corresponding tenant and a reference to the shared index cache and
determining that the index associated with the query is cached in the individual index cache that is specific to the first tenant when the index associated with the query is cached in the individual index cache;
responding to a cache penetration of the individual index cache that is specific to the first tenant by determining that the index associated with the query is cached in the shared index cache, wherein the shared index cache stores indexes for the plurality of tenants, when the index associated with the query is not cached in the individual index cache that is specific to the first tenant and the index associated with the query is cached in the shared index cache;
retrieving the result of the query based on the index in the individual index cache when the index associated with the query is stored in the individual index cache that is specific to the first tenant;
retrieving a result of the query based on the index in the shared index cache when the index associated with the query is not stored in the individual index cache that is specific to the first tenant; and
outputting the result of the query.

### Claim 14 (depends on 13)

The computer program product of claim 13, wherein the shared index cache is updated at a predetermined frequency.

### Claim 15 (depends on 13)

The computer program product of claim 13, wherein the shared index cache is updated in response to the shared index cache being full.

### Claim 16 (depends on 13)

The computer program product of claim 13, wherein updating the shared index cache comprises determining a first index from the shared index cache that is to be evicted, and wherein updating the shared index cache further comprises determining a second index from the index storage to replace the first index in the shared index cache.

### Claim 17 (depends on 13)

The computer program product of claim 13, wherein, in response to the index not being present in the shared index cache, identifying the index in the index storage, wherein the index storage has a higher latency to retrieve the index than the shared index cache.
