# US 2018/0024922 A1 · Join operations in hybrid main memory systems

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

- Number: US 2018/0024922 A1
- Document ID: US20180024922A1
- Status: Published application
- Kind: A1
- Application number: 15/213,674
- Filed: 2016-07-19
- Published: 2018-01-25
- Earliest claimed: 2016-07-19
- Assignees: Sap SE
- Applicants: Sap SE
- Inventors: Ahmad Hassan
- Web page: https://patentgrep.com/patent/US20180024922A1

## CPC

- G06F 16/24561: {Intermediate data storage techniques for performance improvement}
- G06F 16/2456: {Join operations}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Implementations of the present disclosure include methods, systems, and computer-readable storage mediums for receiving an annotated query execution plan (aQEP), the aQEP being processed to execute a query on an in-memory database in a hybrid memory system, and including one or more annotations, each annotation indicating an output of a respective operator that is to be provided as input to a join operator, determining a payload size at least partially based on an estimated size of an intermediate output of the join operator, selecting a memory type from a plurality of memory types in the hybrid memory system based on the payload size and a cache size, and storing, after execution of the aQEP, the intermediate output on the memory type in the hybrid memory system.

## Claims

### Claim 1

A computer-implemented method executed by one or more processors, the method comprising:
receiving, by the one or more processors, an annotated query execution plan (aQEP), the aQEP being processed to execute a query on an in-memory database in a hybrid memory system, and comprising one or more annotations, each annotation indicating an output of a respective operator that is to be provided as input to a join operator;
determining, by the one or more processors, a payload size at least partially based on an estimated size of an intermediate output of the join operator;
selecting, by the one or more processors, a memory type from a plurality of memory types in the hybrid memory system based on the payload size and a cache size; and
storing, by the one or more processors and after execution of the aQEP, the intermediate output on the memory type in the hybrid memory system.

### Claim 2 (depends on 1)

The method of claim 1, wherein the memory type comprises one of dynamic random access memory (DRAM) and non-volatile memory (NVM).

### Claim 3 (depends on 2)

The method of claim 2, wherein the memory type is selected as DRAM in response to determining that the payload size exceeds at least a portion of the cache size.

### Claim 4 (depends on 2)

The method of claim 2, wherein the memory type is selected as NVM in response to determining that the payload size does not exceeds at least a portion of the cache size.

### Claim 5 (depends on 1)

The method of claim 1, wherein the payload size is determined based on a size of a first relation and a size of a second relation that are provided as input to the join operator.

### Claim 6 (depends on 5)

The method of claim 5, wherein one or more of the first relation and the second relation are indicated within the aQEP by respective annotations.

### Claim 7 (depends on 1)

The method of claim 1, wherein the join operator comprises one of a merge-join operator, and a hash-join operator.

### Claim 8

A non-transitory computer-readable storage medium coupled to one or more processors and having instructions stored thereon which, when executed by the one or more processors, cause the one or more processors to perform operations comprising:
receiving an annotated query execution plan (aQEP), the aQEP being processed to execute a query on an in-memory database in a hybrid memory system, and comprising one or more annotations, each annotation indicating an output of a respective operator that is to be provided as input to a join operator;
determining a payload size at least partially based on an estimated size of an intermediate output of the join operator;
selecting a memory type from a plurality of memory types in the hybrid memory system based on the payload size and a cache size; and
storing, after execution of the aQEP, the intermediate output on the memory type in the hybrid memory system.

### Claim 9 (depends on 8)

The computer-readable storage medium of claim 8, wherein the memory type comprises one of dynamic random access memory (DRAM) and non-volatile memory (NVM).

### Claim 10 (depends on 9)

The computer-readable storage medium of claim 9, wherein the memory type is selected as DRAM in response to determining that the payload size exceeds at least a portion of the cache size.

### Claim 11 (depends on 9)

The computer-readable storage medium of claim 9, wherein the memory type is selected as NVM in response to determining that the payload size does not exceeds at least a portion of the cache size.

### Claim 12 (depends on 8)

The computer-readable storage medium of claim 8, wherein the payload size is determined based on a size of a first relation and a size of a second relation that are provided as input to the join operator.

### Claim 13 (depends on 12)

The computer-readable storage medium of claim 12, wherein one or more of the first relation and the second relation are indicated within the aQEP by respective annotations.

### Claim 14 (depends on 8)

The computer-readable storage medium of claim 8, wherein the join operator comprises one of a merge-join operator, and a hash-join operator.

### Claim 15

A system, comprising:
a computing device; and
a computer-readable storage device coupled to the computing device and having instructions stored thereon which, when executed by the computing device, cause the computing device to perform operations comprising:
receiving an annotated query execution plan (aQEP), the aQEP being processed to execute a query on an in-memory database in a hybrid memory system, and comprising one or more annotations, each annotation indicating an output of a respective operator that is to be provided as input to a join operator;
determining a payload size at least partially based on an estimated size of an intermediate output of the join operator;
selecting a memory type from a plurality of memory types in the hybrid memory system based on the payload size and a cache size; and
storing, after execution of the aQEP, the intermediate output on the memory type in the hybrid memory system.

### Claim 16 (depends on 15)

The system of claim 15, wherein the memory type comprises one of dynamic random access memory (DRAM) and non-volatile memory (NVM).

### Claim 17 (depends on 16)

The system of claim 16, wherein the memory type is selected as DRAM in response to determining that the payload size exceeds at least a portion of the cache size.

### Claim 18 (depends on 16)

The system of claim 16, wherein the memory type is selected as NVM in response to determining that the payload size does not exceeds at least a portion of the cache size.

### Claim 19 (depends on 15)

The system of claim 15, wherein the payload size is determined based on a size of a first relation and a size of a second relation that are provided as input to the join operator.

### Claim 20 (depends on 19)

The system of claim 19, wherein one or more of the first relation and the second relation are indicated within the aQEP by respective annotations.
