# US 2015/0149413 A1 · Client-side partition-aware batching of records for insert operations

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

- Number: US 2015/0149413 A1
- Document ID: US20150149413A1
- Status: Published application
- Kind: A1
- Application number: 14/271,218
- Filed: 2014-05-06
- Published: 2015-05-28
- Earliest claimed: 2013-11-22
- Assignees: Sap SE
- Inventors: Chul Won Lee; Juchang Lee; Alexander Schroeder; Myunggon Park; Sang Kyun Cha
- Web page: https://patentgrep.com/patent/US20150149413A1

## CPC

- G06F 16/2386: {Bulk updating operations (data conversion details G06F16/258)}
- G06F 16/23: Updating
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Client-side partition-aware batch insert operations are presented. For example, a server generates partition metadata, which is provided to a client. The client uses the partition metadata to determine the database nodes to which to send batch insert requests. For example, the client divides batch insert data, such as records for a partitioned table, among multiple database nodes having partitions of the table. The client issues batch insert requests to the respective database nodes for execution. When executed by the database nodes, batch insert operations can be performed in parallel.

## Claims

### Claim 1

One of more tangible computer-readable media storing computer-executable instructions for causing a client programmed thereby to perform a method comprising:
with the client, splitting records for insert operations into batches according to partition metadata, wherein the partition metadata indicates how to partition the records between database nodes; and
from the client, issuing a batch insert request for a given batch of the batches for execution.

### Claim 2 (depends on 1)

The one or more computer-readable media of claim 1 wherein the splitting includes, for a record of the records:
determining a database node of the database nodes; and
adding the record to one of the batches that is for the determined database node.

### Claim 3 (depends on 1)

The one or more computer-readable media of claim 1 wherein the splitting includes, for a record of the records:
determining a location; and
adding the record to one of the batches that is for the location.

### Claim 4 (depends on 1)

The one of more computer-readable media of claim 1 wherein the splitting includes, for a record of the records:
based on partitioning criteria for one or more data values of the record, selecting one of the database nodes or a location.

### Claim 5 (depends on 4)

The one or more computer-readable media of claim 4 wherein the selecting uses a hash key calculated from the one or more data values using the partitioning criteria.

### Claim 6 (depends on 1)

The one of more computer-readable media of claim 1 wherein the splitting includes, for a record of the records:
selecting one of the batches according to a round-robin pattern.

### Claim 7 (depends on 6)

The one or more computer-readable media of claim 6 wherein the method further comprises:
from the client, providing, along with the given batch, a flag that indicates the given batch has already been partitioned.

### Claim 8 (depends on 1)

The one of more computer-readable media of claim 1 wherein the issuing depends at least in part on whether the given batch has been filled to a batch size.

### Claim 9 (depends on 1)

The one of more computer-readable media of claim 1 wherein the issuing depends at least in part on whether a last record of the records has been processed.

### Claim 10 (depends on 1)

The one of more computer-readable media of claim 1 wherein the issuing depends at least in part on whether a timer for the given batch has expired.

### Claim 11 (depends on 1)

The one of more computer-readable media of claim 1 wherein the method further comprises:
with the client, updating the partition metadata to account for changes to one or more of partitioning criteria, the database nodes, or locations for the database nodes.

### Claim 12 (depends on 1)

The one or more computer-readable media of claim 1 wherein, after the issuing, the client continues the splitting without waiting for a reply from a server for the batch insert request.

### Claim 13 (depends on 1)

The one or more computer-readable media of claim 1 wherein a single thread at the client performs the splitting.

### Claim 14

A server comprising a processing unit and memory, wherein the server is adapted to perform a method comprising:
with the server, generating partition metadata that indicates how to partition records between database nodes, wherein the partition metadata includes partitioning criteria for records for insert operations; and
from the server, transferring the partition metadata to a client for use in client-side partition-aware routing.

### Claim 15 (depends on 14)

The server of claim 14 wherein the partition metadata is transferred as part of a reply to a request from the client to compile a query.

### Claim 16 (depends on 14)

The server of claim 14 wherein the partition metadata is transferred as part of an update to previous partition metadata transferred to the client.

### Claim 17 (depends on 14)

The server of claim 14 wherein a query optimizer of the server performs the generating.

### Claim 18

A method comprising:
with a client, splitting records for insert operations into batches according to partition metadata, including, for a record of the records:
based at least in part on the partition metadata, determining a database node; and
adding the record to one of the batches that is for the database node; and
from the client, after a given batch of the batches has been filled to a batch size, issuing a batch insert request for the given batch for execution.

### Claim 19 (depends on 18)

The method of claim 18 wherein the determining uses round-robin partitioning or hash-based partitioning.

### Claim 20 (depends on 18)

The method of claim 18 wherein a single thread at the client performs the splitting, and wherein, after the issuing, the client continues the splitting without waiting for a reply from a server for the batch insert request.
