IP Library › Granted Patent US 12,411,831
Granted Patent B2
US 12,411,831 · App. 17/645,214 · Granted Sep 9, 2025

Database index performance improvement

Inventors: Xiaobo Wang (Beijing, CN); Shuo Li (Beijing, CN); Sheng Yan Sun (Beijing, CN); Xiao Hui Wang (Beijing, CN)
Assignee: International Business Machines Corporation
G06F16/2272G06F16/215G06F16/2365
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 12,411,831
App. No.
17/645,214
Filed
Dec 20, 2021
Granted
Sep 9, 2025
Kind
B2
Art Unit
2156
USPC
707/741
Abstract

Managing database operations is provided. The method comprises receiving an insert statement for a database and determining if the insert statement is for a batch insert operation or random insert operation. For a batch insert operation, responsive to determining a threshold number of specified leaf pages are missing from a memory buffer pool of the database, the database asynchronously pre-loads missing leaf pages from a corresponding index on disk into the memory buffer pool. For a random insert operation, responsive to determining a threshold number of specified leaf pages are missing from a memory buffer pool of the database, the database builds at least one memory cache index and inserts key values specified in the insert statement in the memory cache index. The memory cache index is merged with a corresponding index on disk.

Claims (45)

1. A computer-implemented method for managing database operations, the method comprising:

using a number of processors to perform the steps of:

receiving an insert statement for a database;

determining the insert statement is for a batch insert operation or random insert operation;

for a batch insert operation, responsive to determining a threshold number of leaf pages specified in the insert statement are missing from a memory buffer pool of the database, asynchronously pre-loading missing leaf pages from a corresponding index on disk in the database into the memory buffer pool;

for a random insert operation, responsive to determining a threshold number of leaf pages specified in the insert statement are missing from a memory buffer pool of the database:

building at least one memory cache index;

inserting key values specified in the insert statement in the memory cache index; and

merging the memory cache index with a corresponding index on disk in the database.

2. The method of claim 1 , wherein, for a batch insert, a number of sub-tasks access a number of indexes on disk in the database and locate the missing leaf pages for pre-loading into the memory buffer pool.

3. The method of claim 2 , wherein the sub-tasks sort the missing leaf pages for pre-loading into the memory buffer pool.

4. The method of claim 1 , wherein building at least one memory cache index comprises building multiple memory cache indexes.

5. The method of claim 4 , further comprising consolidating the multiple memory cache indexes into a single consolidated memory cache index prior to merging with the corresponding index on disk.

6. The method of claim 5 , wherein consolidating the multiple memory cache indexes comprises merging leaf pages by range when overlap between leaf pages in the indexes is below a specified threshold range.

7. The method of claim 5 , wherein consolidating the multiple memory cache indexes comprises merging leaf pages individually when overlap between leaf pages in the indexes is above a specified threshold range.

8. A system for managing database operations, the system comprising:

a storage device configured to store program instructions; and

one or more processors operably connected to the storage device and configured to execute the program instructions to cause the system to:

receive an insert statement for a database;

determine the insert statement is for a batch insert operation or random insert operation;

for a batch insert operation, responsive to determining a threshold number of leaf pages specified in the insert statement are missing from a memory buffer pool of the database, asynchronously pre-load missing leaf pages from a corresponding index on disk in the database into the memory buffer pool;

for a random insert operation, responsive to determining a threshold number of leaf pages specified in the insert statement are missing from a memory buffer pool of the database:

build at least one memory cache index;

insert key values specified in the insert statement in the memory cache index; and

merge the memory cache index with a corresponding index on disk in the database.

9. The system of claim 8 , wherein, for a batch insert, a number of sub-tasks access a number of indexes on disk in the database and locate the missing leaf pages for pre-loading into the memory buffer pool.

10. The system of claim 9 , wherein the sub-tasks sort the missing leaf pages for pre-loading into the memory buffer pool.

11. The system of claim 8 , wherein building at least one memory cache index comprises building multiple memory cache indexes.

12. The system of claim 8 , further comprising consolidating the multiple memory cache indexes into a single consolidated memory cache index prior to merging with the corresponding index on disk.

13. The system of claim 12 , wherein consolidating the multiple memory cache indexes comprises merging leaf pages by range when overlap between leaf pages in the indexes is below a specified threshold range.

14. The system of claim 12 , wherein consolidating the multiple memory cache indexes comprises merging leaf pages individually when overlap between leaf pages in the indexes is above a specified threshold range.

15. A computer program product for managing database operations, the computer program product comprising:

a computer-readable storage medium having program instructions embodied thereon to perform the steps of:

receiving an insert statement for a database;

determining the insert statement is for a batch insert operation or random insert operation;

for a batch insert operation, responsive to determining a threshold number of leaf pages specified in the insert statement are missing from a memory buffer pool of the database, asynchronously pre-loading missing leaf pages from a corresponding index on disk in the database into the memory buffer pool;

for a random insert operation, responsive to determining a threshold number of leaf pages specified in the insert statement are missing from a memory buffer pool of the database:

building at least one memory cache index;

inserting key values specified in the insert statement in the memory cache index; and

merging the memory cache index with a corresponding index on disk in the database.

16. The computer program product of claim 15 , wherein, for a batch insert, a number of sub-tasks access a number of indexes on disk in the database and locate the missing leaf pages for pre-loading into the memory buffer pool.

17. The computer program product of claim 16 , wherein the sub-tasks sort the missing leaf pages for pre-loading into the memory buffer pool.

18. The computer program product of claim 15 , wherein the at least one memory cache index comprises multiple memory cache indexes, and further comprising consolidating the multiple memory cache indexes into a single consolidated memory cache index prior to merging with the corresponding index on disk.

19. The computer program product of claim 18 , wherein consolidating the multiple memory cache indexes comprises merging leaf pages by range when overlap between leaf pages in the indexes is below a specified threshold range.

20. The computer program product of claim 18 , wherein consolidating the multiple memory cache indexes comprises merging leaf pages individually when overlap between leaf pages in the indexes is above a specified threshold range.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 20, 2021
From: WANG, XIAOBO; LI, SHUO; SUN, SHENG YAN; WANG, XIAO HUI
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 058435/0341 →
Continuity (1)
Related Publication 20230195710A1 · Jun 22, 2023
References Cited (16)
US 5204958A · Cheng · 1993 [cited by examiner]
US 10095721B2 · Chen et al. · 2018 [cited by applicant]
US 10592149B1 · Jenkins · 2020 [cited by examiner]
US 11797510B2 · Subramanian Seshadri · 2023 [cited by examiner]
US 20060182030A1 · Harris · 2006 [cited by examiner]
US 20150347470A1 · Ma et al. · 2015 [cited by applicant]
US 20160092503A1 · Deshmukh et al. · 2016 [cited by applicant]
US 20190205244A1 · Smith · 2019 [cited by examiner]
US 20200065314A1 · Phillips · 2020 [cited by applicant]
CN 105335482A · 2016 [cited by applicant]
WO 2023116347A1 · 2023 [cited by applicant]
Anonymous, “A Method to Improve Performance for Index Operation,” Dec. 31, 2020, An IP.com Prior Art Database Technical Disclosure, IPCOM000264515D, 5 pages. [cited by applicant]
Anonymous, “Fast and resource efficient table index maintenance following mass table record deletes,” Apr. 13, 2011, An IP.com Prior Art Database Technical Disclosure, IPCOM000206068D, 4 pages. [cited by applicant]
Sadoghi et al., “Making Updates Disk-I/O Friendly Using SSDs,” Proceedings of the VLDB Endowment, Aug. 2013, 13 pages. https://www.researchgate.net/publication/262394013. [cited by applicant]
“Prefetching data into the buffer pool,” IBM Documentation, IBM Corporation, copyright 2014, accessed Jun. 2, 2021, 4 pages. https://www.ibm.com/docs/en/db2/11.1?topic=management-prefetching-data-into-buffer-pool. [cited by applicant]
PCT International Search Report and Written Opinion, dated Feb. 28, 2023, regarding Application No. PCT/CN2022/134539, 7 pages. [cited by applicant]