IP Library Granted Patent US 11,416,451
Granted Patent B2
US 11,416,451 · App. 16/730,796 · Granted Aug 16, 2022

Method and system to prefetch data in databases

Inventors: Fang Zheng (San Mateo, CA); Ruiping Li (San Mateo, CA); Cheng Zhu (San Mateo, CA); Congnan Luo (San Mateo, CA); Huaizhi Li (San Mateo, CA); Xiaowei Zhu (San Mateo, CA)
Assignee: ALIBABA GROUP HOLDING LIMITED
G06F16/172G06F16/90335
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,416,451
App. No.
16/730,796
Granted
Aug 16, 2022
Kind
B2
Abstract

The present disclosure provides systems and methods for prefetching data in databases. One method for prefetching data in a database comprises receiving a database query on the database, determining one or more sets of adjacent columns access by the database query, and for each set of adjacent columns of the one or more determined sets, prefetching data in the adjacent columns.

Claims (53)

1. A method for prefetching data in a database, the method comprising:

receiving a database query on the database;

determining a plurality of sets of adjacent columns accessed by the database query, comprising grouping one or more immediately adjacent columns in a table into a respective set of the plurality of sets of adjacent columns; and

while processing data from a first column of a first set of the plurality of sets of adjacent columns, prefetching data from one or more other columns of the first set of adjacent columns, or prefetching data from a second set of the plurality of sets of adjacent columns, wherein the data is processed in response to the database query.

2. The method of claim 1 , wherein the database query comprises a plurality of projections of columns, and the plurality of sets of adjacent columns are determined according to the plurality of projections of columns.

3. The method of claim 1 , wherein the database query comprises a scan operation.

4. The method of claim 1 , wherein the database comprises a row-column hybrid storage database comprising blocks of data, wherein a block of data of the blocks of data comprises some or all data of each column in the database and rows in a block of data of the blocks of data are stored column by column.

5. The method of claim 4 , further comprising:

determining if there is a current block to be processed;

in response to a determination that there is a current block to be processed, reading each set of adjacent columns in the current block;

determining if there is a next block to be processed, wherein the next block is located next to the current block in the database; and

in response to a determination that there is a next block to be processed, prefetching data in each set of adjacent columns in the next block; and

setting the next block as the current block.

6. The method of claim 5 , further comprising:

processing metadata of the blocks to determine if there is a current block to be processed; and

processing metadata of the blocks to determine if there is a next block to be processed.

7. The method of claim 6 , wherein:

processing metadata of the blocks to determine if there is a current block to be processed further comprising determining if a block has data that qualifies a predicate of the database query based on the metadata of the block; and

processing metadata of the blocks to determine if there is a next block to be processed further comprising determining if a block has data that qualifies a predicate of the database query based on the metadata of the block.

8. The method of claim 1 , wherein prefetching data in the adjacent columns further comprises:

prefetching data in the adjacent columns using a system call of an operating system on the database system.

9. A database system, comprising:

a memory storing a set of instructions; and

a processor configured to execute the set of instructions to cause the database system to:

receiving a database query on the database;

determining a plurality of sets of adjacent columns accessed by the database query, comprising grouping one or more immediately adjacent columns in a table into a respective set of the plurality of sets of adjacent columns; and

while processing data from a first column of a first set of the plurality of sets of adjacent columns, prefetching data from one or more other columns of the first set of adjacent columns, or prefetching data from a second set of the plurality of sets of adjacent columns, wherein the data is processed in response to the database query.

10. The database system of claim 9 , wherein the database query comprises a plurality of projections of columns, and the plurality of sets of adjacent columns are determined according to the plurality of projections of columns.

11. The database system of claim 9 , wherein the database is a row-column hybrid storage database comprising blocks of data, wherein a block of data of the blocks of data comprises some or all data of each column in the database.

12. The database system of claim 11 , wherein the processor is further configured to cause the database system to:

determine if there is a current block to be processed;

in response to a determination that there is a current block to be processed, read each set of adjacent columns in the current block, and determine if there is a next block to be processed, wherein the next block is located next to the current block in the database; and

in response to a determination that there is a next block to be processed, prefetch data in each set of adjacent columns in the next block and setting the next block as the current block.

13. The database system of claim 12 , wherein the processor is further configured to cause the database system to:

in determining if there is a current block to be processed, determine if a block has data that qualifies a predicate of the database query based on metadata of the block; and

in determining if there is a next block to be processed, determine if a block has data that qualifies a predicate of the database query based on metadata of the block.

14. The database system of claim 9 , wherein the processor is further configured to cause the database system to:

prefetch data in the adjacent columns using a system call of an operating system on the database system.

15. A non-transitory computer readable medium that stores a set of instructions that is executable by one or more processors of a database system to cause the database system to initiate a method comprising:

receiving a database query on the database;

determining a plurality of sets of adjacent columns accessed by the database query, comprising grouping one or more immediately adjacent columns in a table into a respective set of the plurality of sets of adjacent columns; and

while processing data from a first column of a first set of the plurality of sets of adjacent columns, prefetching data from one or more other columns of the first set of adjacent columns, or prefetching data from a second set of the plurality of sets of adjacent columns, wherein the data is processed in response to the database query.

16. The non-transitory computer readable medium of claim 15 , wherein the database query comprises a plurality of projections of columns, and the plurality of sets of adjacent columns are determined according to the plurality of projections of columns.

17. The non-transitory computer readable medium of claim 15 , wherein the database is a row-column hybrid storage database comprising blocks of data, wherein a block of data of the blocks of data comprises some or all data of each column in the database.

18. The non-transitory computer readable medium of claim 17 , wherein the set of instructions that is executable by one or more processors of the database system to cause the database system to further perform:

determining if there is a current block to be processed;

in response to a determination that there is a current block to be processed, reading each set of adjacent columns in the current block, and determining if there is a next block to be processed, wherein the next block is located next to the current block in the database; and

in response to a determination that there is a next block to be processed, prefetching data in each set of adjacent columns in the next block and setting the next block as the current block.

19. The non-transitory computer readable medium of claim 18 , wherein the set of instructions that is executable by one or more processors of the database system to cause the database system to further perform:

when determining if there is a current block to be processed, determining if a block has data that qualifies a predicate of the database query based on metadata of the block; and

when determining if there is a next block determining if a block has data that qualifies a predicate of the database query based on a metadata of the block.

20. The non-transitory computer readable medium of claim 15 , wherein the set of instructions that is executable by one or more processors of the database system to cause the database system to further perform:

prefetching data in the adjacent columns using a system call of an operating system on the database system.

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 Oct 9, 2020
From: ZHENG, FANG; LI, RUIPING; ZHU, CHENG; LUO, CONGNAN; LI, HUAIZHI; ZHU, XIAOWEI
To: ALIBABA GROUP HOLDING LIMITED
Reel/Frame 054016/0327 →
Continuity (1)
Related Publication 20210200718A1 · Jul 1, 2021