# US 2017/0293468 A1 · Efficient handling of sort payload in a column organized relational database

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

- Number: US 2017/0293468 A1
- Document ID: US20170293468A1
- Status: Published application
- Kind: A1
- Application number: 15/095,080
- Filed: 2016-04-10
- Published: 2017-10-12
- Earliest claimed: 2016-04-10
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Gopi K. ATTALURI; Vijayshankar RAMAN; David C. SHARPE
- Web page: https://patentgrep.com/patent/US20170293468A1

## CPC

- G06F 16/221: {Column-oriented storage; Management thereof}
- G06F 7/24: Sorting, i.e. extracting data from one or more carriers, rearranging the data in numerical or other ordered sequence, and rerecording the sorted data on the original carrier or on a different carrier or set of carriers {sorting methods in general}(G06F7/36 takes precedence)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A system for sorting in a column organized relational database by sorting only key columns in the column organized relational database to reduce memory and CPU usage. The sort may be performed using an in memory sort. After sorting the key columns, the system orders a payload column according to an order indicated by the key columns. The payload column is associated with the key columns in the column organized relational database. The system assesses memory capacity prior to ordering the payload column. Prior to ordering a plurality of payload columns, the system refrains from automatically concatenating the plurality of payload columns, and refrains from automatically de-concatenating any concatenated payload columns after the ordering the plurality of payload columns. The system determines an amount of required memory necessary to order the payload column, and detects an amount of available memory accessible to order the payload column.

## Claims

### Claim at position 1

-9. (canceled)

### Claim 10

A computer program product for sorting in a column organized relational database, the computer program product comprising:
a computer readable storage medium having computer readable program code embodied therewith, the program code executable by a computing processor to:
sort only key columns in the column organized relational database to reduce memory and CPU usage, wherein the sort may be performed using an in memory sort;
after sorting the key columns, order a payload column according to an order indicated by the key columns, wherein the payload column is associated with the key columns in the column organized relational database; and
assess memory capacity prior to ordering the payload column.

### Claim 11 (depends on 10)

The computer program product of claim 10 wherein the computer readable program code configured to order the payload column according to an order indicated by the key columns is further configured to:
prior to ordering a plurality of payload columns, refrain from automatically concatenating the plurality of payload columns; and
refrain from automatically de-concatenating any concatenated payload columns after the ordering the plurality of payload columns.

### Claim 12 (depends on 11)

The computer program product of claim 11 wherein the computer readable program code configured to assess memory capacity prior to ordering the payload column is further configured to:
determine an amount of required memory necessary to order the payload column; and
detect an amount of available memory accessible to order the payload column.

### Claim 13 (depends on 12)

The computer program product of claim 12 further configured to:
determine the plurality of payload columns may be ordered concurrently based the required memory and the available memory.

### Claim 14 (depends on 13)

The computer program product of claim 13 further configured to:
detect a plurality of agents each available to perform at least one of the sorting and the ordering; and
order the plurality of payload columns concurrently wherein each of the plurality of payload columns is ordered individually by at least one of the plurality of agents.

### Claim 15

A system comprising:
a computing processor; and
a computer readable storage medium operationally coupled to the processor, the computer readable storage medium having computer readable program code embodied therewith to be executed by the computing processor, the computer readable program code configured to:
sort only key columns in the column organized relational database to reduce memory and CPU usage, wherein the sort may be performed using an in memory sort;
after sorting the key columns, order a payload column according to an order indicated by the key columns, wherein the payload column is associated with the key columns in the column organized relational database; and
assess memory capacity prior to ordering the payload column.

### Claim 16 (depends on 15)

The system of claim 15 wherein the computer readable program code configured to order the payload column according to an order indicated by the key columns is further configured to:
prior to ordering a plurality of payload columns, refrain from automatically concatenating the plurality of payload columns; and
refrain from automatically de-concatenating any concatenated payload columns after the ordering the plurality of payload columns.

### Claim 17 (depends on 16)

The system of claim 16 wherein the computer readable program code configured to assess memory capacity prior to ordering the payload column is further configured to:
determine an amount of required memory necessary to order the payload column; and
detect an amount of available memory accessible to order the payload column.

### Claim 18 (depends on 17)

The system of claim 17 further configured to:
determine the plurality of payload columns may be ordered concurrently based the required memory and the available memory.

### Claim 19 (depends on 19)

The system of claim 19 further configured to:
detect a plurality of agents each available to perform at least one of the sorting and the ordering; and
order the plurality of payload columns concurrently wherein each of the plurality of payload columns is ordered individually by at least one of the plurality of agents.

### Claim 20 (depends on 1)

The method of claim 1 wherein ordering the payload column according to an order indicated by the key columns comprises:
prior to ordering a plurality of payload columns, determining whether to perform at least one of:
i) concatenating the plurality of payload columns, wherein the concatenated payload columns are de-concatenated after the ordering of the payload columns; and
ii) determining the plurality of payload columns may be ordered concurrently, wherein the determining whether to perform is based on at least one of:
i) a cost of the ordering;
ii) available memory;
iii) possible parallelism of an ordering method; and
iv) a number of available agents.
