# US 2024/0202197 A1 · Distributed data storage using materialized intermediate partitions

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

- Number: US 2024/0202197 A1
- Document ID: US20240202197A1
- Status: Published application
- Kind: A1
- Application number: 18/067,128
- Filed: 2022-12-16
- Published: 2024-06-20
- Earliest claimed: 2022-12-16
- Assignees: Microsoft Technology Licensing, LLC
- Applicants: Microsoft Technology Licensing, LLC
- Inventors: Ziqi MA; Nirav Arvind KUNTAR
- Web page: https://patentgrep.com/patent/US20240202197A1

## CPC

- G06F 16/2456: {Join operations}
- G06F 16/2365: {Ensuring data consistency and integrity}
- G06F 16/278: {Data partitioning, e.g. horizontal or vertical partitioning}
- G06F 16/285: {Clustering or classification}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A device and method for optimizing a merge operation via materialized intermediate partitions that maintains an internal state partitioned on merge-optimized key, which is different from read-optimized key in the read (final) copy. This method is designed to speed up merge operations on large scale data, where both storage and computation happen in distributed systems. When reading new data, the method is to first partitioned with merge key, then merge (e.g. upsert) with a previously materialized snapshot (which is the previous merge result), then materialize (still partitioned by mergekey) and overwrite relevant partitions in the read (final) copy, partitioned on read-optimized key. This reduces cross-network shuffle and significantly improves performance.

## Claims

### Claim 1

A computerized method, comprising:
bucketing a first dataset in a database into a partition, the first dataset including a first value and a first iteration of a second value, wherein the second value is a feature of the first value;
bucketing a second dataset in the database into the partition, the second dataset including the first value and a second iteration of the second value, wherein the second iteration of the second value is different than the first iteration of the second value;
updating the partition to include the first value and the second iteration of the second value; and
transmitting the updated partition to an external storage.

### Claim 2 (depends on 1)

The computerized method of claim 1, further comprising:
receiving a query request; and
outputting a portion of the updated partition based on the received query request.

### Claim 3 (depends on 2)

The computerized method of claim 2, wherein outputting the portion of the updated partition further comprises:
bucketing the updated partition by the second value;
outputting a portion of the updated partition related to the received query request.

### Claim 4 (depends on 1)

The computerized method of claim 1, wherein updating the partition comprises performing an UPSERT operation.

### Claim 5 (depends on 4)

The computerized method of claim 4, wherein performing the UPSERT operation includes:
merging the second dataset with the first dataset includes replacing the first iteration of the second value with the second iteration of the second value.

### Claim 6 (depends on 4)

The computerized method of claim 4, wherein the first value is a merge key.

### Claim 7 (depends on 1)

The computerized method of claim 1, further comprising:
receiving a third dataset, the third dataset including a third value and a third iteration of the second value;
determining the third value does not match the first value; and
bucketing the third dataset into a second partition.

### Claim 8 (depends on 1)

The computerized method of claim 1, further comprising:
receiving a third dataset, the third dataset including a third value and a third iteration of the second value;
determining the third value matches the first value; and
bucketing the third dataset into the first partition; and
updating the partition to include the third value and the third iteration of the second value.

### Claim 9 (depends on 1)

The computerized method of claim 1, wherein the first value is an identifier and the second value indicates at least one of pricing data, discount data, shipping data, or address data associated with the identifier.

### Claim 10 (depends on 1)

The computerized method of claim 1, wherein the partition is implemented in a distributed database storage system.

### Claim 11

A system, comprising:
a processor;
a communication interface; and
a memory storing instructions that, when executed by the processor, cause the processor to:
bucket a first dataset in a database into a partition, the first dataset including a first value and a first iteration of a second value, wherein the second value is a feature of the first value;
bucket a second dataset in the database into the partition, the second dataset including the first value and a second iteration of the second value, wherein the second iteration of the second value is different than the first iteration of the second value;
perform an UPSERT operation that updates the partition to include the first value and the second iteration of the second value; and
transmit, via a communication interface, the updated partition to an external storage.

### Claim 12 (depends on 11)

The system of claim 11, wherein the communication interface is further configured to:
receive a query request; and
output a portion of the updated partition based on the received query request.

### Claim 13 (depends on 12)

The system of claim 12, wherein, to output the portion of the updated partition,
the processor is further configured to bucket the updated partition by the second value; and
the communication interface is further configured to output a portion of the updated partition related to the received query request.

### Claim 14 (depends on 11)

The system of claim 11, wherein, to perform the UPSERT operation, the processor is further configured to:
merge the second dataset with the first dataset including replacing the first iteration of the second value with the second iteration of the second value.

### Claim 15 (depends on 11)

The system of claim 11, wherein the first value is a merge key.

### Claim 16 (depends on 11)

The system of claim 11, wherein the processor is further configured to:
receive a third dataset, the third dataset including a third value and a third iteration of the second value;
determine the third value does not match the first value; and
bucket the third dataset into a second partition.

### Claim 17 (depends on 11)

The system of claim 11, wherein the processor is further configured to:
receive a third dataset, the third dataset including a third value and a third iteration of the second value;
determine the third value matches the first value; and
bucket the third dataset into the first partition; and
update the partition to include the third value and the third iteration of the second value.

### Claim 18

A computer-readable medium storing instructions that, when executed by a processor, cause the processor to:
bucket a first dataset in a database into a partition, the first dataset including a first value and a first iteration of a second value, wherein the second value is a feature of the first value;
bucket a second dataset in the database into the partition, the second dataset including the first value and a second iteration of the second value, wherein the second iteration of the second value is different than the first iteration of the second value;
perform an UPSERT operation that updates the partition to include the first value and the second iteration of the second value;
receive a query request, the query request including a request to return data and a merge key;
bucket the updated partition by the merge key; and
transmit, via a communication interface, a portion of the updated partition related to the received query request.

### Claim 19 (depends on 18)

The computer-readable medium of claim 18, further storing instructions that, when executed by the processor, further cause the processor to:
receive a third dataset, the third dataset including a third value and a third iteration of the second value;
determine the third value does not match the first value; and
bucket the third dataset into a second partition.

### Claim 20 (depends on 18)

The computer-readable medium of claim 18, further storing instructions that, when executed by the processor, further cause the processor to:
receive a third dataset, the third dataset including a third value and a third iteration of the second value;
determine the third value matches the first value; and
bucket the third dataset into the first partition; and
update the partition to include the third value and the third iteration of the second value.
