# US 2025/0007535 A1 · Data compression for columnar databases into arbitrarily-sized persistent pages

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

- Number: US 2025/0007535 A1
- Document ID: US20250007535A1
- Status: Published application
- Kind: A1
- Application number: 18/882,263
- Filed: 2024-09-11
- Published: 2025-01-02
- Earliest claimed: 2021-09-21
- Assignees: Sap SE
- Applicants: Sap SE
- Inventors: Ivan Schreter
- Web page: https://patentgrep.com/patent/US20250007535A1

## CPC

- H03M 7/3088: {employing the use of a dictionary, e.g. LZ78}
- G06F 16/221: {Column-oriented storage; Management thereof}
- H03M 7/3077: {Sorting}
- H03M 7/4081: {Static prefix coding}
- H03M 7/607: {Selection between different types of compressors}
- H03M 7/46: Conversion to or from run-length codes, i.e. by representing the number of consecutive digits, or groups of digits, of the same kind by a code word and a digit indicative of that kind
- H03M 7/6082: {Selection strategies}
- 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)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method for compressing columnar data may include generating, for a data column included in a data chunk, a dictionary enumerating, in a sorted order, a first set of unique values included in the first data column. A compression technique for generated a compressed representation of the data column having a fewest quantity of bytes may be identified based at least on the dictionary. The compression technique including a dictionary compression applying the dictionary and/or another compression technique. A compressed data chunk may be generated by applying the compression technique to compress the data column included in the data chunk. The compressed data chunk may be stored at a database in a variable-size persistent page whose size is allocated based on the size of the compressed representation of the data column. Related systems and articles of manufacture are also provided.

## Claims

### Claim at position 1

1-20. (canceled)

### Claim 21

A system, comprising:
at least one data processor; and
at least one memory storing instructions which, when executed by the at least one data processor, cause operations comprising:
identifying, based at least on a first dictionary that enumerates a first set of unique values included in a first data column included in a data chunk, a first compression technique;
generating a compressed data chunk by at least applying the first compression technique to compress the first data column included in the data chunk; and
storing the compressed data chunk.

### Claim 22 (depends on 21)

The system of claim 21, wherein the first compression technique generates a first compressed representation of the first data column having a fewest quantity of bytes.

### Claim 23 (depends on 21)

The system of claim 21, wherein the compressed data chunk is stored in in a persistent page at a database.

### Claim 24 (depends on 23)

The system of claim 23, wherein the persistent page is allocated based at least on a size of a first compressed representation of the first data column, such that a size of the persistent page corresponds to that of the compressed data chunk.

### Claim 25 (depends on 23)

The system of claim 23, the persistent page is associated with a variable.

### Claim 26 (depends on 21)

The system of claim 21, wherein the first compression technique comprises a null-value compression in response to the first dictionary including a single NULL value.

### Claim 27 (depends on 21)

The system of claim 21, wherein the first compression technique comprises a dictionary compression.

### Claim 28 (depends on 27)

The system of claim 27, wherein in response to the first dictionary includes a single non-NULL value, the first compression technique comprises a single-value compression instead of the dictionary compression.

### Claim 29 (depends on 27)

The system of claim 27, wherein in response to the first dictionary including more than a threshold quantity of unique values with prefixes and/or suffixes, the first compression technique comprises a prefix/suffix compression instead of or in addition to the dictionary compression.

### Claim 30 (depends on 27)

The system of claim 27, wherein in response to the first data column including less than a threshold quantity of runs of a same value and/or the first dictionary is less than a threshold size, the first compression technique comprises a run-length encoding instead of or in addition to the dictionary compression.

### Claim 31 (depends on 27)

The system of claim 27, wherein in response to the first dictionary including less than a threshold quantity of outlier values relative to a range of values, the first compression technique comprises a frame of reference compression instead of or in addition to the dictionary compression.

### Claim 32 (depends on 21)

The system of claim 21, further comprising:
generating, for a second data column included in the data chunk, a second dictionary enumerating, in a sorted order, a second set of unique values included in the second data column.

### Claim 33 (depends on 32)

The system of claim 32, further comprising:
identifying, based at least on the second dictionary, a second compression technique for generating a second compressed representation of the second data column.

### Claim 34 (depends on 33)

The system of claim 33, wherein the second compression technique generates the second compressed representation having a fewest quantity of bytes.

### Claim 35 (depends on 33)

The system of claim 33, wherein the second compression technique comprises a dictionary compression applying the second dictionary.

### Claim 36 (depends on 33)

The system of claim 33, further comprising:
generating the compressed data chunk including by applying the second compression technique to compress the second data column included in the data chunk.

### Claim 37

A computer-implemented method, comprising:
identifying, based at least on a first dictionary that enumerates a first set of unique values included in a first data column included in a data chunk, a first compression technique;
generating a compressed data chunk by at least applying the first compression technique to compress the first data column included in the data chunk; and
storing the compressed data chunk.

### Claim 38 (depends on 37)

The computer-implemented method of claim 37, wherein the first compression technique generates a first compressed representation of the first data column having a fewest quantity of bytes.

### Claim 39 (depends on 37)

The computer-implemented method of claim 37, wherein the compressed data chunk is stored in in a persistent page at a database.

### Claim 40

A non-transitory computer readable medium storing instructions, which when executed by at least one data processor, result in operations comprising:
identifying, based at least on a first dictionary that enumerates a first set of unique values included in a first data column included in a data chunk, a first compression technique;
generating a compressed data chunk by at least applying the first compression technique to compress the first data column included in the data chunk; and
storing the compressed data chunk.
