# US 2024/0004902 A1 · Performance of row table to columnar table replication

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

- Number: US 2024/0004902 A1
- Document ID: US20240004902A1
- Status: Published application
- Kind: A1
- Application number: 17/809,572
- Filed: 2022-06-29
- Published: 2024-01-04
- Earliest claimed: 2022-06-29
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Xue Bo; Xiaobo Wang; He Fang Zhang; YU LIU; Peng Hui Jiang
- Web page: https://patentgrep.com/patent/US20240004902A1

## CPC

- G06F 16/283: {Multi-dimensional databases or data warehouses, e.g. MOLAP or ROLAP}
- G06F 16/2282: {Tablespace storage structures; Management thereof}
- G06F 16/2379: {Updates performed during online database operations; commit processing}
- G06F 16/2462: {Approximate or statistical queries}
- G06F 16/27: Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method, computer program product, and computer system are provided. Statistics for each columnar table are extracted from an online analytical processing (OLAP) database catalog. A transaction table map is created from transaction log records of an online transaction processing (OLTP) database. The transaction table map includes a counter of log records in a transaction and a timestamp indicating a longevity of the transaction. Based on the counter or the longevity exceeding a predefined threshold, the transaction is transformed, and sent to the OLAP database where it is replayed.

## Claims

### Claim 1

A method, comprising:
extracting statistics for each columnar table from an online analytical processing (OLAP) database catalog;
building a transaction table map from transaction log records of an online transaction processing (OLTP) database, wherein the transaction table map includes a counter of log records in a transaction and a timestamp indicating a longevity of the transaction;
based on the counter or the longevity exceeding a predefined threshold, transforming the transaction;
sending the transformed transaction to the OLAP database; and
replaying the transformed transaction at the OLAP.

### Claim 2 (depends on 1)

The method of claim 1, wherein the statistics identify a transaction that is a candidate for transformation.

### Claim 3 (depends on 1)

The method of claim 1, wherein the transforming the transaction further comprises:
creating an external table load statement, comprising an insert operation, an identifier of a data delimiter, a placeholder naming an external table; and
following the external table load statement, inserting a plurality of data delimited data values, and a commit statement.

### Claim 4 (depends on 1)

The method of claim 1, further comprising:
receiving the transformed transaction at the OLAP;
creating a temporary external table file, into which is loaded the plurality of data delimited data values;
replacing the placeholder with a name of the temporary external table file;
creating a uniquely named pipe; and
executing the external table load statement.

### Claim 5 (depends on 1)

The method of claim 1, wherein a transaction not exceeding the counter or the longevity is an as-is transaction.

### Claim 6 (depends on 1)

The method of claim 1, wherein the log records of an as-is transaction are sent directly to the OLAP database without transformation.

### Claim 7 (depends on 1)

The method of claim 1, further comprising:
sorting, at the OLAP database, the log records of an as-is transaction are by table and timestamp within table; and
replaying the log records at the OLAP database.

### Claim 8

A computer program product, the computer program product comprising a non-transitory tangible storage device having program code embodied therewith, the program code executable by a processor of a computer to perform a method, the method comprising:
extracting statistics for each columnar table from an online analytical processing (OLAP) database catalog;
building a transaction table map from transaction log records of an online transaction processing (OLTP) database, wherein the transaction table map includes a counter of log records in a transaction and a timestamp indicating a longevity of the transaction;
based on the counter or the longevity exceeding a predefined threshold, transforming the transaction;
sending the transformed transaction to the OLAP database; and
replaying the transformed transaction at the OLAP.

### Claim 9 (depends on 8)

The computer program product of claim 8, wherein the statistics identify a transaction that is a candidate for transformation.

### Claim 10 (depends on 8)

The computer program product of claim 8, wherein the transforming the transaction further comprises:
creating an external table load statement, comprising an insert operation, an identifier of a data delimiter, a placeholder naming an external table; and
following the external table load statement, inserting a plurality of data delimited data values, and a commit statement.

### Claim 11 (depends on 8)

The computer program product of claim 8, further comprising:
receiving the transformed transaction at the OLAP;
creating a temporary external table file, into which is loaded the plurality of data delimited data values;
replacing the placeholder with a name of the temporary external table file;
creating a uniquely named pipe; and
executing the external table load statement.

### Claim 12 (depends on 8)

The computer program product of claim 8, wherein a transaction not exceeding the counter or the longevity is considered as-is.

### Claim 13 (depends on 8)

The computer program product of claim 8, wherein the log records of an as-is transaction are sent directly to the OLAP database without transformation.

### Claim 14 (depends on 8)

The computer program product of claim 8, further comprising:
sorting, at the OLAP database, the log records of an as-is transaction are by table and timestamp within table; and
replaying the log records at the OLAP database.

### Claim 15 (depends on 8)

The computer program product of claim 8, wherein the enhanced compiler executable code output is based on granularity of inner computation unit requirements of individual threads, and wherein the enhanced scheduler dispatches based on granularity of the thread.

### Claim 16

A computer system, comprising:
one or more processors;
a memory coupled to at least one of the processors;
a set of computer program instructions stored in the memory and executed by at least one of the processors in order to perform actions of:
extracting statistics for each columnar table from an online analytical processing (OLAP) database catalog;
building a transaction table map from transaction log records of an online transaction processing (OLTP) database, wherein the transaction table map includes a counter of log records in a transaction and a timestamp indicating a longevity of the transaction;
based on the counter or the longevity exceeding a predefined threshold, transforming the transaction;
sending the transformed transaction to the OLAP database; and
replaying the transformed transaction at the OLAP.

### Claim 17 (depends on 16)

The computer system of claim 16, wherein the statistics identify a transaction that is a candidate for transformation.

### Claim 18 (depends on 16)

The computer system of claim 16, wherein the transforming the transaction further comprises:
creating an external table load statement, comprising an insert operation, an identifier of a data delimiter, a placeholder naming an external table; and
following the external table load statement, inserting a plurality of data delimited data values, and a commit statement.

### Claim 19 (depends on 16)

The computer system of claim 16, further comprising:
receiving the transformed transaction at the OLAP;
creating a temporary external table file, into which is loaded the plurality of data delimited data values;
replacing the placeholder with a name of the temporary external table file;
creating a uniquely named pipe; and
executing the external table load statement.

### Claim 20 (depends on 16)

The computer system of claim 16, wherein:
a transaction not exceeding the counter or the longevity is an as-is transaction;
the log records of an as-is transaction are sent directly to the OLAP database without transformation, sorted by table and timestamp within the transaction, and replayed at the OLAP database.
