IP Library Granted Patent US 12,373,420
Granted Patent B2
US 12,373,420 · App. 18/053,033 · Granted Jul 29, 2025

Database log performance

Inventors: Hong Mei Zhang (Beijing, CN); Shuo Li (Beijing, CN); Xiaobo Wang (Beijing, CN); Sheng Yan Sun (BeiJing, CN)
Assignee: International Business Machines Corporation
G06F16/2365G06F16/148G06F16/188
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,373,420
App. No.
18/053,033
Granted
Jul 29, 2025
Kind
B2
Abstract

A computer-implemented method improves the performance of write ahead logging. The method includes generating a set of query data and a set of log data, where the set of log data is configured to create a write ahead log, and the set of query data is configured to make changes to data in a database. The method also includes writing the set of query data to a virtual file system. The method further includes separating the set of log data into a set of control intervals, where each control interval includes an entry. The method includes writing, each entry into a log buffer, where the writing the set of query data to the virtual file system and the writing each entry into the log buffer are performed in parallel. The method also includes combining each entry into a complete log.

Claims (39)

1. A computer-implemented method comprising:

generating a set of log data for a query, wherein the generating is configured to create a write ahead log for the query prior to the query making changes in a database, the query is configured to make changes to data in the database, and the creating the write ahead log further comprises:

writing a set of query data for the query into a virtual file system in parallel with the writing the set of log data in a log buffer;

separating the set of log data into a set of control intervals, wherein each control interval includes an entry for an address and an action of the query and each control interval is associated with a corresponding portion of the log buffer;

writing, in response to the separating, the set of log data into the log buffer, wherein the log buffer includes a first log buffer and a second log buffer and the writing into the first log buffer and the second log buffer occurs in parallel; and

combining, in response to the writing, the set of log data from the first log buffer and the second log buffer into a complete log.

2. The computer-implemented method of claim 1 , wherein the first log buffer includes a first log, and the second log buffer includes a second log.

3. The computer-implemented method of claim 2 , wherein each entry in the first log buffer is transferred into the first log, and each entry in the second log buffer is transferred into the second log.

4. The computer-implemented method of claim 2 , wherein each entry includes a sequence marker, wherein the sequence marker indicates a relative order of operations of the query that are performed.

5. The computer-implemented method of claim 4 , wherein the combining of each entry into the complete log further comprises re-sequencing, based on the sequence marker for each entry, all entries into the relative order of operations of the query.

6. The computer-implemented method of claim 5 , further comprising:

storing the complete log on a disk; and

updating, in response to storing the complete log on the disk, data in the database based on the query data.

7. The computer-implemented method of claim 2 , wherein each entry includes a parent object identifier.

8. The computer-implemented method of claim 1 , wherein the writing of the log data into the log buffer is configured to reduce a number of copies of the log data.

9. The computer-implemented method of claim 1 , wherein each entry uses a parent object identifier to identify an associated database object.

10. The method of claim 1 , further comprising:

updating the database, wherein the update occurs after the writing the set of log data into the log buffer and before the combining the set of log data into the complete log.

11. A system comprising:

a processor;

a database;

a write ahead log that includes two or more log buffers and the write ahead log is configured to write entries into the two or more log buffers in parallel; and

a computer-readable storage medium communicatively coupled to the processor and storing program instructions which, when executed by the processor, are configured to cause the processor to:

generate a set of log data from a query, wherein the query is configured to make updates to data in a database, wherein the generating is configured to create the write ahead log prior to the query applying the updates to the database, and wherein the program instructions for creating the write ahead log further comprise program instructions to:

write a set of query data for the query into a virtual file system in parallel with the writing the set of log data into the two or more log buffers;

separate the set of log data into a set of control intervals, wherein each control interval includes an entry for an address and an action of the query and each control interval is associated with a corresponding portion of a log buffer;

write, in response to the separating, the set of log data into the log buffer, wherein the writing into the two or more log buffers occurs in parallel; and

combine, in response to the writing the set of log data from a first log buffer and a second log buffer into the log buffer, the set of log data into a complete log.

12. The system of claim 11 , wherein the first log buffer includes a first log where each entry in the first log buffer is transferred into the first log, and the second log buffer includes a second log where each entry in the second log buffer is transferred into the second log.

13. The system of claim 12 , wherein each entry includes a sequence marker, wherein the sequence marker indicates a relative order of operations of the query are performed.

14. The system of claim 13 , wherein the combining of each entry into the complete log further comprises re-sequencing into the relative order of operations of the query based on the sequence marker for each entry.

15. A computer program product, the computer program product comprising a computer readable storage medium having program instructions embodied therewith, the program instructions executable by a processing unit to cause the processing unit to:

generate a set of log data for a query, wherein the set of log data is configured to create a write ahead log, and the query is configured to make changes to data in a database;

separate the set of log data into a set of control intervals, wherein each control interval includes an entry for an address and an action of the query and each control interval is associated with a corresponding portion of a log buffer;

write the set of log data into the log buffer, wherein the log buffer includes a first log buffer and a second log buffer and the writing into the first log buffer and the second log buffer occurs in parallel and writing a set of query data for the query into a virtual file system occurs in parallel with the writing the set of log data into the log buffer; and

combine, in response to the writing the set of log data from the first log buffer and the second log buffer into the log buffer, the set of log data into a complete log.

16. The computer program product of claim 15 , wherein the first log buffer includes a first log where each entry in the first log buffer is transferred into the first log, and the second log buffer includes a second log where each entry in the second log buffer is transferred into the second log.

17. The computer program product of claim 16 , wherein each entry includes a sequence marker, wherein the sequence marker indicates a relative order of operations of the query are performed.

18. The computer program product of claim 17 , wherein the combining of each entry into the complete log further comprises re-sequencing into the relative order of operations of the query based on the sequence marker for each entry.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 7, 2022
From: ZHANG, HONG MEI; LI, SHUO; WANG, XIAOBO; SUN, SHENG YAN
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 061673/0930 →
Continuity (2)
Continuation 17348832 · Jun 16, 2021
Related Publication 20230062616A1 · Mar 2, 2023
References Cited (21)
US 8909996B2 · Srinivasan · 2014 [cited by applicant]
US 10706009B2 · Minh · 2020 [cited by applicant]
US 10929428B1 · Brahmadesam · 2021 [cited by examiner]
US 20060036660A1 · Lynn · 2006 [cited by examiner]
US 20100162247A1 · Welc · 2010 [cited by examiner]
US 20100205196A1 · Schreiber · 2010 [cited by applicant]
US 20100211554A1 · Reid · 2010 [cited by examiner]
US 20150019516A1 · Wein · 2015 [cited by applicant]
US 20150120659A1 · Srivastava · 2015 [cited by examiner]
US 20150254264A1 · Yu · 2015 [cited by applicant]
US 20160078085A1 · Hu · 2016 [cited by examiner]
US 20160350353A1 · Li · 2016 [cited by applicant]
US 20180300083A1 · Volos · 2018 [cited by examiner]
US 20190138621A1 · Tobias · 2019 [cited by applicant]
US 20190188097A1 · Gupta · 2019 [cited by examiner]
US 20190377821A1 · Pleshachkov · 2019 [cited by applicant]
US 20200034042A1 · Ma · 2020 [cited by applicant]
US 20210034477A1 · Pederson · 2021 [cited by examiner]
Mell et al., “The NIST Definition of Cloud Computing”, Recommendations of the National Institute of Standards and Technology, Special Publication 800-145, Sep. 2011, 7 pages. [cited by applicant]
Zhang et al., “Improving Database Log Performance”, U.S. Appl. No. 17/348,832, filed Jun. 16, 2021, 38 pages. [cited by applicant]
“List of IBM Patents or Patent Applications Treated as Related”, Appendix P, IBM, filed herewith, 2 pages. [cited by applicant]