# US 2023/0409603 A1 · Linear interval-based dynamic range partitioning

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

- Number: US 2023/0409603 A1
- Document ID: US20230409603A1
- Status: Published application
- Kind: A1
- Application number: 17/826,957
- Filed: 2022-05-27
- Published: 2023-12-21
- Earliest claimed: 2022-05-27
- Assignees: Sap SE
- Applicants: Sap SE
- Inventors: Zhilong Hao; Xiaoke Liu; Jiaxin Liu; Weimin Qi; Zhe Qu; Qingwei Ren
- Web page: https://patentgrep.com/patent/US20230409603A1

## CPC

- G06F 16/278: {Data partitioning, e.g. horizontal or vertical partitioning}
- G06F 16/2282: {Tablespace storage structures; Management thereof}
- G06F 16/2358: {Change logging, detection, and notification (replication G06F16/27)}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Computer-readable media, methods, and systems are disclosed for linear interval-based dynamic range partitioning in one or more database systems. A request is received by a database management system to insert a new row into a partitioned database table. The partitioned database table may include a plurality of existing partitions and a partition others partition. Based on determining that the new row should be inserted into the partition others partition a series of steps are performed. First, one or more new partitions are added to the partitioned database table. Then, the new row is inserted into the one of the one or more new partitions in the partitioned database table.

## Claims

### Claim 1

One or more non-transitory computer-readable media storing computer-executable instructions that, when executed by a processor, perform a method for linear interval-based dynamic range partitioning in one or more databases, the method comprising:
receiving, by a database management system, a request to insert a new row into a partitioned database table,
wherein the partitioned database table comprises a plurality of existing table partitions and a partition others table partition,
wherein different table partitions of the partitioned database table have associated ranges and store data values within the associated ranges,
and wherein inserted rows that do not match any of the associated ranges of the existing table partitions are inserted in the partition others table partition; and
based on determining that the new row should be inserted into the partition others table partition, performing a migration, by way of a background process when the database management system is idle or under less than full loading, comprising:
adding one or more new table partitions to the partitioned database table; and
inserting the new row into one of the one or more new table partitions in the partitioned database table.

### Claim 2

(canceled)

### Claim 3 (depends on 1)

The non-transitory computer-readable media of claim 1, wherein the plurality of existing table partitions is persisted in connection with data stores connected to a single host and the one or more new table partitions is persisted in connection with the single host.

### Claim 4 (depends on 1)

The non-transitory computer-readable media of claim 1, wherein the method further comprises:
in response to determining that a configuration parameter controlling background merging of empty partitions is enabled:
identifying one or more empty partitions associated with the plurality of existing table partitions; and
merging the one or more empty partitions by adjusting a range associated with at least one of the plurality of existing table partitions and deleting the one or more empty partitions.

### Claim 5 (depends on 4)

The non-transitory computer-readable media of claim 4, wherein the configuration parameter controlling background merging of empty partitions is disabled by default.

### Claim 6 (depends on 1)

The non-transitory computer-readable media of claim 1, wherein the method further comprises:
iterating over, by way of the background process, a plurality of other rows contained in the partition others table partition; and
in response to determining that one or more of the plurality of other rows correspond to the new table partition, migrating the other rows to the one or more new table partitions, by way of the background process, based on a key value associated with the one or more of the plurality of other rows.

### Claim 7 (depends on 1)

The non-transitory computer-readable media of claim 1, wherein one or more ranges corresponding to the one or more new table partitions is determined based on a specification of a dynamic interval that is specified when the partitioned table is created or altered.

### Claim 8

A method for linear interval-based dynamic range partitioning in one or more databases, the method comprising:
receiving, by a database management system, a record to be inserted into a partitioned database table,
wherein the partitioned database table comprises a plurality of existing table partitions and a partition others table partition,
wherein different table partitions of the partitioned database table have associated ranges and store data values within the associated ranges,
and wherein inserted records that do not match any of the associated ranges of the existing table partitions are inserted in the partition others table partition; and
based on determining that the record has a key value outside ranges associated with the plurality of existing table partitions, performing a migration, by way of a background process when the database management system is idle or under less than full loading, comprising:
adding one or more new table partitions to the partitioned database table; and
inserting the record to be inserted into one of the one or more new table partitions in the partitioned database table,
wherein one or more ranges corresponding to the one or more new table partitions is determined based on a specification of a dynamic interval that is specified when the partitioned table is created or altered.

### Claim 9

(canceled)

### Claim 10 (depends on 9)

The method of claim 9, wherein the plurality of existing table partitions is persisted in connection with data stores connected to a single host and the one or more new table partitions is persisted in connection with the single host.

### Claim 11 (depends on 8)

The method of claim 8, further comprising:
in response to determining that a configuration parameter controlling background merging of empty partitions is enabled:
identifying one or more empty partitions associated with the plurality of existing table partitions; and
merging the one or more empty partitions by adjusting a range associated with at least one of the plurality of existing table partitions and deleting the one or more empty partitions.

### Claim 12 (depends on 11)

The method of claim 11, wherein the configuration parameter controlling background merging of empty partitions is disabled by default.

### Claim 13 (depends on 8)

The method of claim 8, further comprising:
iterating over, by way of the background process, a plurality of other rows contained in the partition others table partition; and
in response to determining that one or more of the plurality of other rows correspond to the new table partition, migrating the other rows to the one or more new table partitions, by way of the background process, based on a key value associated with the one or more of the plurality of other rows.

### Claim 14 (depends on 8)

The method of claim 8, wherein one or more ranges corresponding to the one or more new table partitions is determined based on a specification of a dynamic interval that is specified when the partitioned table is created or altered.

### Claim 15

A system for linear interval-based dynamic range partitioning in one or more databases, the system comprising:
at least one processor;
and at least one non-transitory memory storing computer executable instructions that when executed by the at least one processor cause the system to carry out actions comprising:
receiving, by a database management system, a request to insert a new record into a range partitioned database table,
wherein the range partitioned database table comprises a plurality of existing table partitions having existing ranges and a partition others table partition,
wherein different table partitions of the range partitioned database table store data values within the existing ranges,
and wherein inserted records that do not match any of the existing ranges of the existing table partitions are inserted in the partition others table partition; and
based on determining that the new record has a key that is outside the existing ranges of the plurality of existing table partitions, performing a migration, by way of a background process when the database management system is idle or under less than full loading, comprising:
adding one or more new table partitions to the range partitioned database table; and
inserting the new record into one of the one or more new table partitions in the range partitioned database table.

### Claim 16

(canceled)

### Claim 17 (depends on 15)

The system of claim 15, wherein the plurality of existing table partitions is persisted in connection with data stores connected to a single host and the one or more new table partitions is persisted in connection with the single host.

### Claim 18 (depends on 15)

The system of claim 15, wherein the actions further comprise:
in response to determining that a configuration parameter controlling background merging of empty partitions is enabled:
identifying one or more empty partitions associated with the plurality of existing table partitions; and
merging the one or more empty partitions by adjusting a range associated with at least one of the plurality of existing table partitions and deleting the one or more empty partitions.

### Claim 19 (depends on 18)

The system of claim 18, wherein the configuration parameter controlling background merging of empty partitions is disabled by default.

### Claim 20 (depends on 15)

The system of claim 15, wherein the actions further comprise:
iterating over, by way of a background process, a plurality of other rows contained in the partition others partition; and
in response to determining that one or more of the plurality of other rows correspond to the new partition, migrating the other rows to the one or more new partitions, by way of the background process, based on a key value associated with the one or more of the plurality of other rows.

### Claim 21 (depends on 1)

The non-transitory computer-readable media of claim 1, wherein the new row is associated with one or more fields, wherein each table partition of the plurality of existing table partitions and the one or more new table partitions is defined according to the one or more fields, and wherein determining that the new row should be inserted into the partition others table partition further comprises identifying that the one or more fields does not define a target partition from the plurality of existing table partitions.

### Claim 22 (depends on 4)

The non-transitory computer-readable media of claim 4, said merging the one or more empty partitions by adjusting the range associated with at least one of the plurality of existing table partitions and deleting the one or more empty partitions comprises merging the one or more empty partitions by executing a data definition language CREATE TABLE statement specifying a plurality of ranges of column values, wherein the plurality of ranges of column values in the CREATE TABLE statement comprise one or more combinations of the one or more empty partitions and one or more of the plurality of existing table partitions.

### Claim 23 (depends on 8)

The method of claim 8, wherein the record to be inserted is associated with one or more fields, wherein each table partition of the plurality of existing table partitions and the one or more new table partitions is defined according to the one or more fields, and wherein determining the record to be inserted into the partition others table partition further comprises identifying that the one or more fields does not define a target partition from the plurality of existing table partitions.
