IP Library Granted Patent US 8,965,857
Granted Patent B2
US 8,965,857 · App. 13/730,207 · Granted Feb 24, 2015

Method and system to avoid space bloating during run-time compression

Inventors: Panfeng Zhou (Dublin, CA); Katsunori Terada (Dublin, CA); Yanhong Wang (Dublin, CA)
Assignee: Sybase, Inc.
G06F17/30153
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 8,965,857
App. No.
13/730,207
Granted
Feb 24, 2015
Kind
B2
Abstract

Methods, systems, and computer program products are provided to manage a database system. The method includes locking during a database system idle time access by the database system to a data page of a data allocation unit, compressing during the database system idle time a data stored in the locked data page, and recording during the database system idle time an indication that the compressed and locked data page includes free storage space, wherein unlocked data pages of the data allocation unit are accessible by the database system during the compressing of the data stored in the locked data page. Thus, the data page may be compressed during idle time and the space freed therein may be used during a subsequent run time without the need for a reorganization of the data pages within the corresponding table (as in, for example, operation of a reorg+rebuild SQL command combination).

Claims (72)

1. A method comprising:

locking, by one or more computing devices during an idle time of a database system, access by the database system to a data page;

compressing, by the one or more computing devices during the idle time of the database system, data stored in the locked data page while the data page is locked; and

recording, by the one or more computing devices during, the idle time of the database system, an indication that the locked data page includes free storage space in the locked data page,

wherein the data page is one of a plurality of data pages in a data allocation unit of the database system, and

wherein unlocked data pages of the data allocation unit are accessible by the database system during the compressing of the data stored in the locked data page.

2. The method of claim 1 , further comprising:

unlocking, by the one or more computing devices, access to the locked and compressed data page; and

storing, by the one or more computing devices during a run time of the database system, a second data in the compressed data page based on the indication that the compressed data page includes free storage space.

3. The method of claim 2 , further comprising:

recording, by the one or more computing devices during the run time of the database system, an indication that the current data page for storing data is the compressed data page; and

deleting, by the one or more computing devices during the run time of the database system, the indication that the compressed data page includes free storage space.

4. The method of claim 2 , further comprising:

recording, by the one or more computing devices during the run time of the database system, an indication that a second data page of the data allocation unit is full;

locking, by the one or more computing devices during a second idle time of a database system, access by the database system to the second data page; and

compressing, by the one or more computing devices during the second idle time of the database system, data stored in the locked second data page,

wherein unlocked data pages of the data allocation unit are accessible by the database system during the compressing of the data stored in the locked second data page.

5. The method of claim 1 , wherein

the database system comprises a memory partition for storing data pages,

the memory partition includes a partition descriptor data structure for storing information about stored data pages, and

the recording of the indication that the compressed and locked data page includes free storage space comprises recording the indication in a partition description data structure corresponding to the partition of the locked and compressed data page.

6. A method comprising:

storing, by one or more computing devices during a ran time of a database system, data in a data page that includes a compressed data based on an indication that the data page includes space freed by a compression of data.

7. The method of claim 6 , further comprising:

allocating, by the one or more computing devices during the run time of the database system, a second data page for storing data based on an indication that no previously-allocated and previously-compressed data page includes space freed by a compression of data.

8. The method of claim 7 , further comprising:

recording, by the one or more computing devices during the run time of the database system, an indication that the second data page is full;

compressing, by the one or more computing devices during an idle time of the database system subsequent to the run time of the database system, data stored in the second data page; and

recording, by the one or more computing devices, an indication that the second data page includes space freed by a compression of data.

9. A database system comprising:

a memory; and

at least one processor coupled to the memory and configured to:

lock, during an idle time of the database system, access to a data page;

compress, during the idle time of the database system, data stored in the locked data page while the data page is locked; and

record, during the idle time of the database system, an indication that the locked data page includes free storage space in the locked data page,

wherein the data page is one of a plurality of data pages in a data allocation unit of the database system, and

wherein unlocked data pages of the data allocation unit are accessible by the database system during the compressing of the data stored in the locked data page.

10. The database system of claim 9 , the at least one processor further configured to:

unlock access to the locked and compressed data page; and

store, during a run time of the database system, a second data in the compressed data page based on the indication that the compressed data page includes free storage space.

11. The database system of claim 10 , the at least one processor further configured to:

record, during the run time of the database system, an indication that the current data page for storing data is the compressed data page; and

delete, during the run time of the database system, the indication that the compressed data page includes free storage space.

12. The database system of claim 10 , the at least one processor further configured to:

record, during the run time of the database system, an indication that a second data page of the data allocation unit is full;

lock, during a second idle time of a database system, access by the database system to the second data page; and

compress, during the second idle time of the database system, data stored in the locked second data page,

wherein unlocked data pages of the data allocation unit are accessible by the database system during the compressing of the data stored in the locked second data page.

13. The database system of claim 9 , the at least one processor further configured to:

store data pages according to a memory partition, wherein the memory partition includes a partition descriptor data structure for storing information about stored data pages; and

record the indication that the compressed and locked data page includes free storage by recording the indication in a partition description data structure corresponding to the partition of the locked and compressed data page.

14. A computer-readable storage device having stored thereon instructions, execution of which, by a computing device, cause the computing device to perform operations comprising:

locking, by one or more computing devices during an idle time of a database system, access by the database system to a data page;

compressing, by the one or more computing devices during the idle time of the database system, data stored in the locked data page while the data page is locked; and

recording, by the one or more computing devices during the idle time of the database system, an indication that the locked data page includes free storage space in the locked data page,

wherein the data page is one of a plurality of data pages in a data allocation unit of the database system, and

wherein unlocked data pages of the data allocation unit are accessible by the database system during the compressing of the data stored in the locked data page.

15. The computer-readable storage device of claim 14 , the operations further comprising:

unlocking, by the one or more computing devices, access to the locked and compressed data page; and

storing, by the one or more computing devices during a run time of the database system, a second data in the compressed data page based on the indication that the compressed data page includes free storage space.

16. The computer-readable storage device of claim 15 , the operations further comprising:

recording, by the one or more computing devices during the run time of the database system, an indication that the current data page for storing data is the compressed data page; and

deleting, by the one or more computing devices during the run time of the database system, the indication that the compressed data page includes free storage space.

17. The computer-readable storage device of claim 15 , the operations further comprising:

recording, by the one or more computing devices during the run time of the database system, an indication that a second data page of the data allocation unit is full;

locking, by the one or more computing devices during a second idle time of a database system, access by the database system to the second data page; and

compressing, by the one or more computing devices during the second idle time of the database system, data stored in the locked second data page,

wherein unlocked data pages of the data allocation unit are accessible by the database system during the compressing of the data stored in the locked second data page.

18. The computer-readable storage device of claim 14 , wherein

the database system comprises a memory partition for storing data pages,

the memory partition includes a partition descriptor data structure for storing information about stored data pages, and

the recording of the indication that the compressed and locked data page includes free storage space comprises recording the indication in a partition description data structure corresponding to the partition of the locked and compressed data page.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 6, 2013
From: SAP AG
To: SYBASE, INC.
Reel/Frame 031172/0989 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 29, 2013
From: ZHOU, PANFENG; TERADA, KATSUNORI; WANG, YANHONG
To: SAP AG
Reel/Frame 030502/0530 →
Continuity (1)
Related Publication 20140188821A1 · Jul 3, 2014