IP Library Granted Patent US 11,216,412
Granted Patent B2
US 11,216,412 · App. 16/742,727 · Granted Jan 4, 2022

Intelligent merging for efficient updates in columnar databases

Inventors: Luo Congnan (Sunnyvale, CA); Fang Zheng (Sunnyvale, CA); Cheng Zhu (Sunnyvale, CA); Xiaowei Zhu (Sunnyvale, CA); Ruiping Li (Sunnyvale, CA)
G06F16/119G06F16/18G06F16/23
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,216,412
App. No.
16/742,727
Granted
Jan 4, 2022
Kind
B2
Abstract

Intelligent merging for efficient updates in columnar databases are disclosed, including: determining a current age associated with a row in a database, wherein the database comprises a write storage and a read storage, wherein the row is located in the write storage; determining a set of one or more merge criteria based at least in part on a modification age distribution, wherein the modification age distribution is dynamically determined based at least in part on previous transactions at the database; determining whether the current age meets the set of merge criteria; and in response to a determination that the current age meets the set of merge criteria, merging the row from the write storage into the read storage.

Claims (76)

1. A database system, comprising:

one or more processors configured to:

determine a current age associated with a row in a database, wherein the database comprises a write storage and a read storage, wherein the row is located in the write storage;

determine a set of one or more merge criteria based at least in part on a modification age distribution, wherein the modification age distribution is dynamically determined based at least in part on previous transactions at the database;

determine whether the current age meets the set of merge criteria; and

in response to a determination that the current age meets the set of merge criteria, merge the row from the write storage into the read storage; and

one or more memories coupled to the one or more processors and configured to provide instructions to the one or more processors.

2. The database system of claim 1 , wherein the one or more processors are further configured to store, for each of a set of elapse time buckets, a minimum transaction identifier (ID) corresponding to an initial transaction performed at the write storage and a maximum transaction ID corresponding to a last transaction performed at the write storage during that elapse time bucket, wherein each of the set of elapse time buckets is defined by a corresponding lower time boundary and a corresponding upper time boundary.

3. The database system of claim 1 , wherein the one or more processors are further configured to determine the modification age distribution, including to:

receive a request to update a row in the write storage;

determine that the request is a first update to the row;

determine an approximated creation time corresponding to the row;

update the row based at least in part on the request;

determine a modification time associated with the updated row;

use the modification time and the approximated creation time to determine a modification age corresponding to the row; and

use the modification age corresponding to the row to update the modification age distribution.

4. The database system of claim 3 , wherein to determine the approximated creation time corresponding to the row comprises to:

determine an initial transaction ID corresponding to the row;

determine a matching elapse time bucket associated with a range of transaction IDs that includes the initial transaction ID; and

determine the approximated creation time corresponding to the row using at least one of a lower time boundary and an upper time boundary associated with the matching elapse time bucket.

5. The database system of claim 3 , wherein to use the modification age corresponding to the row to update the modification age distribution comprises to:

determine a matching modification age group associated with the modification age distribution that includes the modification age corresponding to the row; and

update a counter corresponding to the matching modification age group.

6. The database system of claim 1 , wherein to determine the set of merge criteria based at least in part on the modification age distribution comprises to:

receive a configured confidence level;

determine a mean, a standard deviation, or both, associated with the modification age distribution; and

determine the set of merge criteria based at least in part on one or more of the following: the configured confidence level, the mean associated with the modification age distribution, and the standard deviation associated with the modification age distribution.

7. The database system of claim 1 , wherein the set of merge criteria comprises a threshold merge age, and wherein to determine whether the current age meets the set of merge criteria comprises to determine whether the current age is greater than the threshold merge age.

8. The database system of claim 1 , wherein to determine the current age associated with the row comprises to:

determine an approximated creation time corresponding to the row;

determine a current time; and

determine the current age corresponding to the row using the current time and the approximated creation time corresponding to the row.

9. The database system of claim 1 , wherein the write storage stores data in a row-oriented format and the read storage stores data in a column-oriented format.

10. The database system of claim 1 , wherein the current age comprises a first current age, wherein the row comprises a first row, and wherein the one or more processors are further configured to:

determine a second current age associated with a second row in the write storage;

determine whether the second current age meets the set of merge criteria; and

in response to a determination that the second current age does not meet the set of merge criteria, omit to merge the second row from the write storage into the read storage.

11. A method, comprising:

determining a current age associated with a row in a database, wherein the database comprises a write storage and a read storage, wherein the row is located in the write storage;

determining a set of one or more merge criteria based at least in part on a modification age distribution, wherein the modification age distribution is dynamically determined based at least in part on previous transactions at the database;

determining whether the current age meets the set of merge criteria; and

in response to a determination that the current age meets the set of merge criteria, merging the row from the write storage into the read storage.

12. The method of claim 11 , further comprising storing, for each of a set of elapse time buckets, a minimum transaction identifier (ID) corresponding to an initial transaction performed at the write storage and a maximum transaction ID corresponding to a last transaction performed at the write storage during that elapse time bucket, wherein each of the set of elapse time buckets is defined by a corresponding lower time boundary and a corresponding upper time boundary.

13. The method of claim 11 , further comprising determining the modification age distribution, including:

receiving a request to update a row in the write storage;

determining that the request is a first update to the row;

determining an approximated creation time corresponding to the row;

updating the row based at least in part on the request;

determining a modification time associated with the updated row;

using the modification time and the approximated creation time to determine a modification age corresponding to the row; and

using the modification age corresponding to the row to update the modification age distribution.

14. The method of claim 13 , wherein determining the approximated creation time corresponding to the row comprises:

determining an initial transaction ID corresponding to the row;

determining a matching elapse time bucket associated with a range of transaction IDs that includes the initial transaction ID; and

determining the approximated creation time corresponding to the row using at least one of a lower time boundary and an upper time boundary associated with the matching elapse time bucket.

15. The method of claim 13 , wherein using the modification age corresponding to the row to update the modification age distribution comprises:

determining a matching modification age group associated with the modification age distribution that includes the modification age corresponding to the row; and

updating a counter corresponding to the matching modification age group.

16. The method of claim 11 , wherein determining the set of merge criteria based at least in part on the modification age distribution comprises:

receiving a configured confidence level;

determining a mean, a standard deviation, or both, associated with the modification age distribution; and

determining the set of merge criteria based at least in part on one or more of the following: the configured confidence level, the mean associated with the modification age distribution, and the standard deviation associated with the modification age distribution.

17. The method of claim 11 , wherein the set of merge criteria comprises a threshold merge age, and wherein determining whether the current age meets the set of merge criteria comprises determining whether the current age is greater than the threshold merge age.

18. The method of claim 11 , wherein determining the current age associated with the row comprises:

determining an approximated creation time corresponding to the row;

determining a current time; and

determining the current age corresponding to the row using the current time and the approximated creation time corresponding to the row.

19. The method of claim 11 , wherein the current age comprises a first current age, wherein the row comprises a first row, and the method further comprises:

determining a second current age associated with a second row in the write storage;

determining whether the second current age meets the set of merge criteria; and

in response to a determination that the second current age does not meet the set of merge criteria, omitting to merge the second row from the write storage into the read storage.

20. A computer program product, the computer program product being embodied in a non-transitory computer-readable storage medium and comprising computer instructions for:

determining a current age associated with a row in a database, wherein the database comprises a write storage and a read storage, wherein the row is located in the write storage;

determining a set of one or more merge criteria based at least in part on a modification age distribution, wherein the modification age distribution is dynamically determined based at least in part on previous transactions at the database;

determining whether the current age meets the set of merge criteria; and

in response to a determination that the current age meets the set of merge criteria, merging the row from the write storage into the read storage.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 29, 2026
From: ALIBABA GROUP HOLDING LIMITED
To: CLOUD INTELLIGENCE ASSETS HOLDING (SINGAPORE) PRIVATE LIMITED
Reel/Frame 075499/0384 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 23, 2020
From: CONGNAN, LUO; ZHENG, FANG; ZHU, CHENG; ZHU, XIAOWEI; LI, RUIPING
To: ALIBABA GROUP HOLDING LIMITED
Reel/Frame 052199/0403 →
Continuity (1)
Related Publication 20210216498A1 · Jul 15, 2021