# US 2018/0024928 A1 · Modified query execution plans in hybrid memory systems for in-memory databases

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

- Number: US 2018/0024928 A1
- Document ID: US20180024928A1
- Status: Published application
- Kind: A1
- Application number: 15/213,816
- 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/US20180024928A1

## CPC

- G06F 11/3457: {Performance evaluation by simulation}
- G06F 16/24542: {Plan optimisation}
- G06F 12/0842: for multiprocessing or multitasking
- G06F 2212/151: Emulated environment, e.g. virtual machine
- G06F 2212/205: Hybrid memory, e.g. using both volatile and non-volatile memory
- Y02D 10/00: Energy efficient computing, e.g. low power processors, power management or thermal management
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- Y02D: CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE

## Abstract

Implementations of the present disclosure include methods, systems, and computer-readable storage mediums for receiving a query from an application, processing a query execution plan (QEP) of the query using a cache simulator to simulate queries to an in-memory database in a hybrid memory system, providing a miss-curve based on the QEP, the miss-curve relating miss-ratios to memory sizes, and determining relative sizes of a first type of memory and a second type of memory in the hybrid memory system at least partially based on the miss-curve.

## Claims

### Claim 1

A computer-implemented method executed by one or more processors, the method comprising:
receiving, by the one or more processors, a query from an application;
processing, by the one or more processors, a query execution plan (QEP) of the query using a cache simulator to simulate queries to an in-memory database in a hybrid memory system;
providing, by the one or more processors, a miss-curve based on the QEP, the miss-curve relating miss-ratios to memory sizes; and
determining relative sizes of a first type of memory and a second type of memory in the hybrid memory system at least partially based on the miss-curve.

### Claim 2 (depends on 1)

The method of claim 1, wherein determining relative sizes of the first type of memory and the second type of memory comprises:
providing a threshold miss-ratio;
determining, using the miss-curve, a memory size corresponding to the threshold miss-ratio; and
providing a size of one of the first type of memory and the second type of memory as the memory size.

### Claim 3 (depends on 1)

The method of claim 1, wherein the miss-curve is provided based on fragmenting one or more relations to respectively provide one or more fragmented relations, the QEP being executed over the one or more fragmented relations using the cache simulator.

### Claim 4 (depends on 3)

The method of claim 3, wherein, after the first type of memory and the second type of memory are sized in the hybrid memory system, QEPs to be executed on the hybrid memory system are executed over fragmented relations.

### Claim 5 (depends on 1)

The method of claim 1, wherein the miss-curve is one of a plurality of miss-curves, and the relative sizes of the first type of memory and the second type of memory are determined at least partially based on the plurality of miss-curves.

### Claim 6 (depends on 1)

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

### Claim 7 (depends on 1)

The method of claim 1, further comprising:
receiving source code of the application;
providing an instrumented application that includes the source code and instrumentation code, the instrumented application comprising at least one instruction for profiling memory traffic of the application; and
executing the instrumented application to process the QEP to provide the miss-curve.

### 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 a query from an application;
processing a query execution plan (QEP) of the query using a cache simulator to simulate queries to an in-memory database in a hybrid memory system;
providing a miss-curve based on the QEP, the miss-curve relating miss-ratios to memory sizes; and
determining relative sizes of a first type of memory and a second type of memory in the hybrid memory system at least partially based on the miss-curve.

### Claim 9 (depends on 8)

The computer-readable storage medium of claim 8, wherein determining relative sizes of the first type of memory and the second type of memory comprises:
providing a threshold miss-ratio;
determining, using the miss-curve, a memory size corresponding to the threshold miss-ratio; and
providing a size of one of the first type of memory and the second type of memory as the memory size.

### Claim 10 (depends on 8)

The computer-readable storage medium of claim 8, wherein the miss-curve is provided based on fragmenting one or more relations to respectively provide one or more fragmented relations, the QEP being executed over the one or more fragmented relations using the cache simulator.

### Claim 11 (depends on 10)

The computer-readable storage medium of claim 10, wherein, after the first type of memory and the second type of memory are sized in the hybrid memory system, QEPs to be executed on the hybrid memory system are executed over fragmented relations.

### Claim 12 (depends on 8)

The computer-readable storage medium of claim 8, wherein the miss-curve is one of a plurality of miss-curves, and the relative sizes of the first type of memory and the second type of memory are determined at least partially based on the plurality of miss-curves.

### Claim 13 (depends on 8)

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

### Claim 14 (depends on 8)

The computer-readable storage medium of claim 8, wherein operations further comprise:
receiving source code of the application;
providing an instrumented application that includes the source code and instrumentation code, the instrumented application comprising at least one instruction for profiling memory traffic of the application; and
executing the instrumented application to process the QEP to provide the miss-curve.

### 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 a query from an application;
processing a query execution plan (QEP) of the query using a cache simulator to simulate queries to an in-memory database in a hybrid memory system;
providing a miss-curve based on the QEP, the miss-curve relating miss-ratios to memory sizes; and
determining relative sizes of a first type of memory and a second type of memory in the hybrid memory system at least partially based on the miss-curve.

### Claim 16 (depends on 15)

The system of claim 15, wherein determining relative sizes of the first type of memory and the second type of memory comprises:
providing a threshold miss-ratio;
determining, using the miss-curve, a memory size corresponding to the threshold miss-ratio; and
providing a size of one of the first type of memory and the second type of memory as the memory size.

### Claim 17 (depends on 15)

The system of claim 15, wherein the miss-curve is provided based on fragmenting one or more relations to respectively provide one or more fragmented relations, the QEP being executed over the one or more fragmented relations using the cache simulator.

### Claim 18 (depends on 17)

The system of claim 17, wherein, after the first type of memory and the second type of memory are sized in the hybrid memory system, QEPs to be executed on the hybrid memory system are executed over fragmented relations.

### Claim 19 (depends on 15)

The system of claim 15, wherein the miss-curve is one of a plurality of miss-curves, and the relative sizes of the first type of memory and the second type of memory are determined at least partially based on the plurality of miss-curves.

### Claim 20 (depends on 15)

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