# US 2013/0159246 A1 · On-line transaction processing (oltp) compression and re-compression of database data

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2013/0159246 A1
- Document ID: US20130159246A1
- Status: Published application
- Kind: A1
- Application number: 13/763,663
- Filed: 2013-02-09
- Published: 2013-06-20
- Earliest claimed: 2007-10-19
- Assignees: Oracle International Corporation
- Inventors: Vineet Marwah; Valentin G. Stredie; Dheeraj Pandey; Amit Ganesh
- Web page: https://patentgrep.com/patent/US20130159246A1

## CPC

- G06F 16/254: {Extract, transform and load [ETL] procedures, e.g. ETL data flows in data warehouses}
- G06F 16/221: {Column-oriented storage; Management thereof}
- G06F 16/2379: {Updates performed during online database operations; commit processing}
- G06F 16/283: {Multi-dimensional databases or data warehouses, e.g. MOLAP or ROLAP}
- H03M 7/30: Compression (speech analysis-synthesis for redundancy reduction G10L19/00; for image communication H04N); Expansion; Suppression of unnecessary data, e.g. redundancy reduction
- G06F 2212/401: Compressed data
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H03M: CODING; DECODING; CODE CONVERSION IN GENERAL (using fluidic means F15C4/00; optical analogue/digital converters G02F7/00; coding, decoding or code conversion, specially adapted for particular applications, see the relevant subclasses, e.g. G01D, G01R, G06F, G06T, G09G, G10L, G11B, G11C, H04B, H04L, H04M, H04N; ciphering or deciphering for cryptography or other purposes involving the need for secrecy G09C)

## Abstract

A computer is programmed to compress data of a database in response to database modification language (DML) statements generated by on-line transaction processing (OLTP) systems. In several embodiments, data that is initially added to a database block is left uncompressed until a predetermined condition is satisfied, which happens infrequently (relative to OLTP transactions on the block). When satisfied, the computer automatically compresses all uncompressed data in the block, which increases the amount of unused space in the block. New data is thereafter added uncompressed to the partially compressed block, until satisfaction of a predetermined condition whereby the partially compressed block is again compressed, i.e. re-compressed. Adding of new data to a partially compressed block and its compression are repeated unless another predetermined condition is met, in response to which the block is not further re-compressed, thereby to recognize a limit on the benefit from compression.

## Claims

### Claim 1

A method implemented in a computer for compression of data in a database, the method comprising:
determining whether at least one predetermined condition is satisfied;
in response to the determining that the at least one predetermined condition is satisfied:
decompressing first compressed data from a block comprising the first compressed data and first uncompressed data, to obtain second uncompressed data from the first compressed data, the block being comprised among multiple blocks in the database; and
compressing at least the first uncompressed data and the second uncompressed data together, to generate second compressed data; and
storing the block in a mass storage device.

### Claim 2 (depends on 1)

The method of claim 1 wherein:
unused space in the block after compressing is greater than unused space in the block prior to decompressing.

### Claim 3 (depends on 1)

The method of claim 1 further comprising:
writing new uncompressed data to the block if at least another predetermined condition is satisfied, else writing the new uncompressed data to another block.

### Claim 4 (depends on 3)

The method of claim 3 wherein:
the writing is performed subsequent to the compressing and prior to the storing.

### Claim 5 (depends on 3)

The method of claim 3 wherein:
the writing is performed prior to the decompressing; and
the new uncompressed data is compressed during the compressing.

### Claim 6 (depends on 1)

The method of claim 1 wherein:
the at least one predetermined condition comprises unused space within the block being below a threshold.

### Claim 7 (depends on 1)

The method of claim 1 further comprising:
repeating, at least the decompressing and the compressing, until unused space in the block satisfies another predetermined condition.

### Claim 8 (depends on 1)

The method of claim 1 wherein:
the block comprises a set of symbols; and
the second compressed data comprises a plurality of references, each reference identifying a symbol in the set of symbols.

### Claim 9 (depends on 8)

The method of claim 8 wherein:
at least a first symbol in the set of symbols is at a level of columns in a database table and at least a second symbol in the set of symbols spans across a group of columns.

### Claim 10 (depends on 1)

The method of claim 1 wherein:
the block is comprised in a segment in the database, and the segment comprises the multiple blocks.

### Claim 11 (depends on 1)

The method of claim 1 wherein:
the block is of fixed size.

### Claim 12 (depends on 1)

The method of claim 1 further comprising:
receiving a database modification language (DML) statement from an on-line transaction processing (OLTP) system, prior to the decompressing.

### Claim 13 (depends on 12)

The method of claim 12 wherein:
the database modification language (DML) statement is comprised in a transaction; and
the at least one predetermined condition is satisfied on receipt of a commit statement of the transaction.

### Claim 14

One or more non-transitory computer readable storage media comprising instructions to at least one processor to process data in a database, the instructions comprising:
instructions to check whether at least one predetermined condition is satisfied;
responsive to the at least one predetermined condition being determined to be satisfied by execution of the instructions to check:
instructions to decompress first compressed data from a block comprising the first compressed data and first uncompressed data, to obtain second uncompressed data from the first compressed data, the block being comprised among multiple blocks in the database; and
instructions to compress at least the first uncompressed data and the second uncompressed data together, to generate second compressed data; and
instructions to store the block in a mass storage device.

### Claim 15 (depends on 14)

The one or more non-transitory computer readable storage media of claim 14 wherein:
unused space in the block after compressing is greater than unused space in the block prior to execution of the instructions to decompress.

### Claim 16 (depends on 14)

The one or more non-transitory computer readable storage media of claim 14 further comprising:
instructions to write new uncompressed data to the block if at least another predetermined condition is satisfied, else write the new uncompressed data to another block.

### Claim 17 (depends on 16)

The one or more non-transitory computer readable storage media of claim 16 wherein:
the instructions to write are to be executed subsequent to execution of the instructions to compress and prior to the instructions to store.

### Claim 18 (depends on 16)

The one or more non-transitory computer readable storage media of claim 16 wherein:
the instructions to write are to be executed prior to execution of the instructions to decompress; and
the new uncompressed data is compressed by the instructions to compress.

### Claim 19 (depends on 14)

The one or more non-transitory computer readable storage media of claim 14 wherein:
the at least one predetermined condition comprises unused space within the block being below a threshold.

### Claim 20 (depends on 14)

The one or more non-transitory computer readable storage media of claim 14 further comprising:
instructions to repeatedly execute, at least the instructions to decompress and the instructions to compress, until unused space in the block satisfies another predetermined condition.

### Claim 21 (depends on 14)

The one or more non-transitory computer readable storage media of claim 14 wherein:
the block comprises a set of symbols; and
the second compressed data comprises a plurality of references, each reference identifying a symbol in the set of symbols.

### Claim 22 (depends on 21)

The one or more non-transitory computer readable storage media of claim 21 wherein:
at least a first symbol in the set of symbols is at a level of columns in a database table and at least a second symbol in the set of symbols spans across a group of columns.

### Claim 23 (depends on 14)

The one or more non-transitory computer readable storage media of claim 14 wherein:
the block is comprised in a segment in the database, and the segment comprises the multiple blocks.

### Claim 24 (depends on 14)

The one or more non-transitory computer readable storage media of claim 14 wherein:
the block is of fixed size.

### Claim 25 (depends on 14)

The one or more non-transitory computer readable storage media of claim 14 further comprising:
instructions to receive a database modification language (DML) statement from an on-line transaction processing (OLTP) system, prior to execution of the instructions to decompress.

### Claim 26 (depends on 25)

The one or more non-transitory computer readable storage media of claim 25 wherein:
the database modification language (DML) statement is comprised in a transaction; and
the at least one predetermined condition is satisfied on receipt of a commit statement of the transaction.

### Claim 27

A database management system, implemented at least partially by a processor to compress data in a database, the database management system comprising:
means for checking whether at least one predetermined condition is satisfied;
responsive to said at least one predetermined condition being found to be satisfied by the means for checking:
means for decompressing first compressed data from a block comprising the first compressed data and first uncompressed data, to obtain second uncompressed data from the first compressed data, the block being comprised among multiple blocks in the database;
means for compressing at least the first uncompressed data and the second uncompressed data together, to generate second compressed data; and
means for storing the block in a mass storage device.

### Claim 28 (depends on 27)

The database management system of claim 27 wherein:
the at least one predetermined condition comprises unused space within the block being below a threshold.

### Claim 29 (depends on 27)

The database management system of claim 27 further comprising:
means for writing new uncompressed data to the block if at least another predetermined condition is satisfied, else writing the new uncompressed data to another block.

### Claim 30 (depends on 29)

The database management system of claim 29 wherein:
the means for writing is to be operated subsequent to operation of the means for decompressing and prior to operation of the means for storing.

### Claim 31 (depends on 29)

The database management system of claim 29 wherein:
the means for writing is to be operated prior to operation of the means for decompressing.

### Claim 32 (depends on 27)

The database management system of claim 27 further comprising:
means for repeatedly operating, at least the means for decompressing and the means for compressing, until unused space in the block satisfies another predetermined condition.

### Claim 33 (depends on 27)

The database management system of claim 27 wherein:
the block comprises a set of symbols; and
the second compressed data comprises a plurality of references, each reference identifying a symbol in the set of symbols.

### Claim 34 (depends on 27)

The database management system of claim 27 wherein:
at least a first symbol in the set of symbols is at a level of columns in a database table and at least a second symbol in the set of symbols spans across a group of columns.

### Claim 35 (depends on 27)

The database management system of claim 27 further comprising:
means for receiving a database modification language (DML) statement from an on-line transaction processing (OLTP) system, prior to operation of the means for decompressing.
