IP Library › Granted Patent US 11,334,489
Granted Patent B2
US 11,334,489 · App. 16/932,874 · Granted May 17, 2022

Elastic columnar cache for cloud databases

Inventors: Anjan Kumar Amirishetty (Freemont, CA); Xun Cheng (Dublin, CA); Viral Shah (Mountain View, CA)
Assignee: Google LLC
G06F12/0871G06F9/5016G06F12/0891G06F16/221G06F16/24552G06F16/278
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 11,334,489
App. No.
16/932,874
Granted
May 17, 2022
Kind
B2
Abstract

A method for providing elastic columnar cache includes receiving cache configuration information indicating a maximum size and an incremental size for a cache associated with a user. The cache is configured to store a portion of a table in a row-major format. The method includes caching, in a column-major format, a subset of the plurality of columns of the table in the cache and receiving a plurality of data requests requesting access to the table and associated with a corresponding access pattern requiring access to one or more of the columns. While executing one or more workloads, the method includes, for each column of the table, determining an access frequency indicating a number of times the corresponding column is accessed over a predetermined time period and dynamically adjusting the subset of columns based on the access patterns, the maximum size, and the incremental size.

Claims (44)

1. A method comprising:

receiving, at data processing hardware, cache configuration information indicating a maximum size and an incremental size for a cache associated with a user, the cache configured to store a portion of a table stored on memory hardware in communication with the data processing hardware, the table stored on the memory hardware in a row-major format and comprising a plurality of columns and a plurality of rows;

caching, by the data processing hardware, in a column-major format, a subset of the plurality of columns of the table in the cache associated with the user;

receiving, at the data processing hardware, a plurality of data requests, each data request requesting access to the table stored on the memory hardware and associated with a corresponding access pattern requiring access to one or more of the plurality of columns of the table; and

while executing one or more workloads on the data processing hardware:

for each column of the plurality of columns of the table, determining, by the data processing hardware, an access frequency indicating a number of times the corresponding column is accessed over a predetermined time period based on the corresponding access pattern associated with each of the plurality of data requests; and

dynamically adjusting, by the data processing hardware, the subset of the plurality of columns cached in the column-major format in real-time based on the access patterns, the maximum size for the cache, and the incremental size for the cache.

2. The method of claim 1 , wherein dynamically adjusting the subset of the plurality of columns cached in the column-major format comprises removing one or more columns from the subset of the plurality of columns in the cache, the removed one or more columns associated with access frequencies that satisfy a contraction access frequency threshold.

3. The method of claim 1 , wherein dynamically adjusting the subset of the plurality of columns cached in the column-major format comprises adding one or more columns to the subset of the plurality of columns in the cache, the added one or more columns associated with access frequencies that satisfy an expansion access frequency threshold.

4. The method of claim 1 , wherein the column-major format comprises a virtual horizontal partitioning of the row-major format.

5. The method of claim 1 , wherein caching the subset of the plurality of columns comprises generating one or more table fragments each comprising a respective portion of one or more of the plurality of columns of the table.

6. The method of claim 1 , wherein the cache comprises shared memory accessible by the one or more workloads executing on the data processing hardware.

7. The method of claim 6 , wherein dynamically adjusting the subset of the plurality of columns cached in the column-major format comprises dynamically adjusting the subset of the plurality of columns cached in the column-major format without restarting any of the one or more workloads.

8. The method of claim 1 , wherein dynamically adjusting the subset of the plurality of columns cached in the column-major format comprises one of increasing a size of the cache by an amount equal to the incremental size or decreasing the size of the cache by the amount equal to the incremental size.

9. The method of claim 8 , further comprising, prior to dynamically adjusting the subset of the plurality of columns by increasing the size of the cache by the amount equal to the incremental size:

determining, by the data processing hardware, whether increasing the cache by the amount equal to the incremental size exceeds the maximum size; and

when increasing the cache by the amount equal to the incremental size would exceed the maximum size, declining, by the data processing hardware, to increase the size of the cache.

10. The method of claim 1 , wherein:

the cache comprises a plurality of segments; and

dynamically adjusting the subset of the plurality of columns cached in the column-major format comprises grouping columns together in segments based on the access patterns.

11. The method of claim 10 , wherein grouping the columns in segments based on the access patterns comprises grouping infrequently accessed columns together.

12. A system comprising:

data processing hardware; and

memory hardware in communication with the data processing hardware, the memory hardware storing instructions that when executed on the data processing hardware cause the data processing hardware to perform operations comprising:

receiving cache configuration information indicating a maximum size and an incremental size for a cache associated with a user, the cache configured to store a portion of a table stored on the memory hardware in communication with the data processing hardware, the table stored on the memory hardware in a row-major format and comprising a plurality of columns and a plurality of rows;

caching, in a column-major format, a subset of the plurality of columns of the table in the cache associated with the user;

receiving a plurality of data requests, each data request requesting access to the table stored on the memory hardware and associated with a corresponding access pattern requiring access to one or more of the plurality of columns of the table; and

while executing one or more workloads on the data processing hardware:

for each column of the plurality of columns of the table, determining an access frequency indicating a number of times the corresponding column is accessed over a predetermined time period based on the corresponding access pattern associated with each of the plurality of data requests; and

dynamically adjusting the subset of the plurality of columns cached in the column-major format in real-time based on the access patterns, the maximum size for the cache, and the incremental size for the cache.

13. The system of claim 12 , wherein dynamically adjusting the subset of the plurality of columns cached in the column-major format comprises removing one or more columns from the subset of the plurality of columns in the cache, the removed one or more columns associated with access frequencies that satisfy a contraction access frequency threshold.

14. The system of claim 12 , wherein dynamically adjusting the subset of the plurality of columns cached in the column-major format comprises adding one or more columns to the subset of the plurality of columns in the cache, the added one or more columns associated with access frequencies that satisfy an expansion access frequency threshold.

15. The system of claim 12 , wherein the column-major format comprises a virtual horizontal partitioning of the row-major format.

16. The system of claim 12 , wherein caching the subset of the plurality of columns comprises generating one or more table fragments each comprising a respective portion of one or more of the plurality of columns of the table.

17. The system of claim 12 , wherein the cache comprises shared memory accessible by the one or more workloads executing on the data processing hardware.

18. The system of claim 17 , wherein dynamically adjusting the subset of the plurality of columns cached in the column-major format comprises dynamically adjusting the subset of the plurality of columns cached in the column-major format without restarting any of the one or more workloads.

19. The system of claim 12 , wherein dynamically adjusting the subset of the plurality of columns cached in the column-major format comprises one of increasing a size of the cache by an amount equal to the incremental size or decreasing the size of the cache by the amount equal to the incremental size.

20. The system of claim 19 , wherein the operations further comprise, prior to dynamically adjusting the subset of the plurality of columns by increasing the size of the cache by the amount equal to the incremental size:

determining whether increasing the cache by the amount equal to the incremental size exceeds the maximum size; and

when increasing the cache by the amount equal to the incremental size would exceed the maximum size, declining to increase the size of the cache.

21. The system of claim 12 , wherein

the cache comprises a plurality of segments; and

dynamically adjusting the subset of the plurality of columns cached in the column-major format comprises grouping columns together in segments based on the access patterns.

22. The system of claim 21 , wherein grouping the columns in segments based on the access patterns comprises grouping infrequently accessed columns together.

Assignments (2)
CORRECTIVE ASSIGNMENT TO CORRECT THE ASSIGNEE NAME PREVIOUSLY RECORDED AT REEL: 53248 FRAME: 300. ASSIGNOR(S) HEREBY CONFIRMS THE ASSIGNMENT. Recorded Mar 5, 2026
From: AMIRISHETTY, ANJAN KUMAR; CHENG, XUN; SHAH, VIRAL
To: GOOGLE LLC
Reel/Frame 075019/0758 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 20, 2020
From: AMIRISHETTY, ANJAN KUMAR; SHAH, VIRAL; CHENG, XUN
To: GOOGLE LLP
Reel/Frame 053248/0300 →
Continuity (1)
Related Publication 20220019539A1 · Jan 20, 2022
Cited By (1)
US 12,737,297