IP Library Granted Patent US 9,372,880
Granted Patent B2
US 9,372,880 · App. 13/873,019 · Granted Jun 21, 2016

Reclamation of empty pages in database tables

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 9,372,880
App. No.
13/873,019
Granted
Jun 21, 2016
Kind
B2
Abstract

Provided are techniques for reclamation of empty pages in database tables. In response to receiving a plurality of records for insertion into a database table, the plurality of records are inserted into one or more contiguous pages. In response to at least some of the plurality of records being deleted from the database table, the one or more contiguous pages are reclaimed by: relocating any records from the plurality of records remaining in the one or more contiguous pages and releasing the one or more contiguous pages.

Claims (50)

1. A method, comprising:

assigning, with a processor of a computer, contiguous pages that are empty to a first database table;

grouping records in the contiguous pages using auxiliary meta data of the first database table based on a first period of time in which the records are inserted into the first database table and based on a pattern of previous insert operations and delete operations of one or more database applications, wherein the auxiliary meta data comprises a block map object that groups the records according to the first period of time by:

receiving a first plurality of records at the first database table of a first insert operation during the first period of time;

in response to the first insert operation, inserting the first plurality of records into a first set of the contiguous pages in an append mode, wherein the append mode inserts new records into pages of the contiguous pages that do not contain older records;

receiving a second plurality of records at the first database table of a second insert operation during the first period of time; and

in response to the second insert operation, inserting the second plurality of records into a second set of the contiguous pages in the append mode, wherein the first plurality of records and the second plurality of records are clustered based on the first period of time;

deleting, at a second period of time, a subset of the first plurality of records and the second plurality of records from the first database table, the first set, and the second set; and

in response to the deleting, reclaiming sparsely populated contiguous pages by:

identifying the contiguous pages as sparsely populated using the auxiliary meta data;

relocating to new pages any remaining records from the first plurality of records and the second plurality of records that have not been deleted in the identified contiguous pages;

determining that the relocating leaves the identified contiguous pages empty using the auxiliary meta data;

in response to determining that the identified contiguous pages are empty, releasing the identified contiguous pages; and

assigning the released contiguous pages that are empty to a second database table.

2. The method of claim 1 , wherein previously inserted records are stored in a first page, and wherein new records are added to an end of the first database table and are stored in a second page.

3. The method of claim 1 , wherein a Software as a Service (SaaS) is provided to perform the method.

4. A computer program product, the computer program product comprising a non-transitory computer readable storage medium having program code embodied therewith, the program code executable by at least one processor to perform:

assigning contiguous pages that are empty to a first database table;

grouping records in the contiguous pages using auxiliary meta data of the first database table based on a first period of time in which the records are inserted into the first database table and based on a pattern of previous insert operations and delete operations of one or more database applications, wherein the auxiliary meta data comprises a block map object that groups the records according to the first period of time by:

receiving a first plurality of records at the first database table of a first insert operation during the first period of time;

in response to the first insert operation, inserting the first plurality of records into a first set of the contiguous pages in an append mode, wherein the append mode inserts new records into pages of the contiguous pages that do not contain older records;

receiving a second plurality of records at the first database table of a second insert operation during the first period of time; and

in response to the second insert operation, inserting the second plurality of records into a second set of the contiguous pages in the append mode, wherein the first plurality of records and the second plurality of records are clustered based on the first period of time;

deleting, at a second period of time, a subset of the first plurality of records and the second plurality of records from the first database table, the first set, and the second set; and

in response to the deleting, reclaiming sparsely populated contiguous pages by:

identifying the contiguous pages as sparsely populated using the auxiliary meta data;

relocating to new pages any remaining records from the first plurality of records and the second plurality of records that have not been deleted in the identified contiguous pages;

determining that the relocating leaves the identified contiguous pages empty using the auxiliary meta data;

in response to determining that the identified contiguous pages are empty, releasing the identified contiguous pages; and

assigning the released contiguous pages that are empty to a second database table.

5. The computer program product of claim 4 , wherein previously inserted records are stored in a first page, and wherein new records are added to an end of the first database table and are stored in a second page.

6. The computer program product of claim 4 , wherein a Software as a Service (SaaS) is configured to perform the computer program product operations.

7. A computer system, comprising:

one or more processors, one or more computer-readable memories and one or more computer-readable, tangible storage devices; and

program instructions, stored on at least one of the one or more computer-readable, tangible storage devices for execution by at least one of the one or more processors via at least one of the one or more memories, to perform:

assigning contiguous pages that are empty to a first database table;

grouping records in the contiguous pages using auxiliary meta data of the first database table based on a first period of time in which the records are inserted into the first database table and based on a pattern of previous insert operations and delete operations of one or more database applications, wherein the auxiliary meta data comprises a block map object that groups the records according to the first period of time by:

receiving a first plurality of records at the first database table of a first insert operation during the first period of time;

in response to the first insert operation, inserting the first plurality of records into a first set of the contiguous pages in an append mode, wherein the append mode inserts new records into pages of the contiguous pages that do not contain older records;

receiving a second plurality of records at the first database table of a second insert operation during the first period of time; and

in response to the second insert operation, inserting the second plurality of records into a second set of the contiguous pages in the append mode, wherein the first plurality of records and the second plurality of records are clustered based on the first period of time;

deleting, at a second period of time, a subset of the first plurality of records and the second plurality of records from the first database table, the first set, and the second set; and

in response to the deleting, reclaiming sparsely populated contiguous pages by:

identifying the contiguous pages as sparsely populated using the auxiliary meta data;

relocating to new pages any remaining records from the first plurality of records and the second plurality of records that have not been deleted in the identified contiguous pages;

determining that the relocating leaves the identified contiguous pages empty using the auxiliary meta data;

in response to determining that the identified contiguous pages are empty, releasing the identified contiguous pages; and

assigning the released contiguous pages that are empty to a second database table.

8. The computer system of claim 7 , wherein previously inserted records are stored in a first page, and wherein new records are added to an end of the first database table and are stored in a second page.

9. The computer system of claim 7 , wherein a Software as a Service (SaaS) is provided to perform the system operations.

Assignments (3)
CHANGE OF NAME Recorded Aug 26, 2014
From: SAP AG
To: SAP SE
Reel/Frame 033625/0223 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 30, 2013
From: HOP HING, NELSON; HURAS, MATTHEW A.; MCARTHUR, CATHERINE S.; MCKEOUGH, SEAN W.; ROMANUFA, KERILEY K.
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 030321/0424 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 30, 2013
From: HAAS, FRANK-MARTIN; ZIEGLER, TORSTEN W.E.
To: SAP AG
Reel/Frame 030323/0483 →