# US 2019/0294614 A1 · Consistent query execution in hybrid dbms

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

- Number: US 2019/0294614 A1
- Document ID: US20190294614A1
- Status: Published application
- Kind: A1
- Application number: 16/438,561
- Filed: 2019-06-12
- Published: 2019-09-26
- Earliest claimed: 2016-08-09
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Andreas Brodt; Oliver Koeth; Daniel Martin; Knut Stolze
- Web page: https://patentgrep.com/patent/US20190294614A1

## CPC

- G06F 16/273: {Asynchronous replication or reconciliation}
- G06F 16/2282: {Tablespace storage structures; Management thereof}
- G06F 16/2455: Query execution
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A computer-implemented method for computer query processing and/or data-table management in a computer system. The method includes generating a table that exists as a first instance in a first database and as a second instance in a second database. The method includes generating a current replication batch of pooled changes of the first instance that committed at or before a first time. The method includes propagating changes specified in the current replication batch to the second instance. The method includes assigning a batch-ID of the current replication batch to the query. The method includes executing the query on the second instance using the batch-ID as a filter to exclude any changes that have an assigned batch-ID of a replication batch having committed later than the current replication batch. The method includes returning results of the query execution on the second instance.

## Claims

### Claim 1

A computer-implemented method, the method comprising:
generating, by one or more processors, a table that exists as a first instance in a first database and as a second instance in a second database;
generating, by the one or more processors, a current replication batch of pooled changes of the first instance that committed at or before a first time;
propagating, by the one or more processors, changes specified in the current replication batch to the second instance;
assigning, by the one or more processors, a batch-ID of the current replication batch to the query;
executing, by the one or more processors, the query on the second instance using the batch-ID as a filter to exclude any changes that have an assigned batch-ID of a replication batch having committed later than the current replication batch; and
returning, by the one or more processors, results of the query execution on the second instance.

### Claim 2 (depends on 1)

The computer-implemented method of claim 1, the method comprising:
determining, by the one or more processors, the first time based on a commit time of at least one most recent write transaction that was committed before receipt of the query.

### Claim 3 (depends on 1)

The computer-implemented method of claim 1, the method comprising:
asynchronously replicating, by the one or more processors, the current replication batch to the second instance, thereby propagating the changes specified in the current replication batch to the second instance.

### Claim 4 (depends on 1)

The computer-implemented method of claim 1, the method comprising:
storing, by the one or more processors, each change that is specified in the current replication batch in the second instance.

### Claim 5 (depends on 1)

The computer-implemented method of claim 1, the method comprising:
initiating, by the one or more processors, execution of the query on the second instance in response to a determination that a replication of the current replication batch to the second instance was completed.

### Claim 6 (depends on 1)

The computer-implemented method of claim 1, the method comprising:
responsive to a determination to execute the query against the second instance, sending, by the one or more processors, the query and the assigned batch-ID to a database engine that maintains the second database.

### Claim 7 (depends on 1)

The computer-implemented method of claim 1, the method including:
executing, by the one or more processors, a plurality of write transactions, thereby respectively changing the first instance; and
asynchronously pooling, by the one or more processors, the changes of the first instance introduced by the write transactions.

### Claim 8 (depends on 1)

The computer-implemented method of claim 1, the method including:
in response to receiving the query against the table, determining whether to execute the query against the first instance or against the second instance, wherein the method is implemented by a data processing system that includes and a replication module, a first database engine maintaining the first database, and a second database engine maintaining the second database.

### Claim 9

A computer program product, the computer program product comprising a computer readable storage medium having program instructions embodied therewith, wherein the computer readable storage medium is not a transitory signal per se, the program instructions executable by a device to cause the device to perform a method comprising:
generating, by one or more processors, a table that exists as a first instance in a first database and as a second instance in a second database;
generating, by the one or more processors, a current replication batch of pooled changes of the first instance that committed at or before a first time;
propagating, by the one or more processors, changes specified in the current replication batch to the second instance;
assigning, by the one or more processors, a batch-ID of the current replication batch to the query;
executing, by the one or more processors, the query on the second instance using the batch-ID as a filter to exclude any changes that have an assigned batch-ID of a replication batch having committed later than the current replication batch; and
returning, by the one or more processors, results of the query execution on the second instance.

### Claim 10 (depends on 9)

The computer program product of claim 9, the method comprising:
determining, by the one or more processors, the first time based on a commit time of at least one most recent write transaction that was committed before receipt of the query.

### Claim 11 (depends on 9)

The computer program product of claim 9, the method comprising:
asynchronously replicating, by the one or more processors, the current replication batch to the second instance, thereby propagating the changes specified in the current replication batch to the second instance.

### Claim 12 (depends on 9)

The computer program product of claim 9, the method comprising:
storing, by the one or more processors, each change that is specified in the current replication batch in the second instance.

### Claim 13 (depends on 9)

The computer program product of claim 9, the method comprising:
initiating, by the one or more processors, execution of the query on the second instance in response to a determination that a replication of the current replication batch to the second instance was completed.

### Claim 14 (depends on 9)

The computer program product of claim 9, the method comprising:
responsive to a determination to execute the query against the second instance, sending, by the one or more processors, the query and the assigned batch-ID to a database engine that maintains the second database.

### Claim 15 (depends on 9)

The computer program product of claim 9, the method including:
executing, by the one or more processors, a plurality of write transactions, thereby respectively changing the first instance; and
asynchronously pooling, by the one or more processors, the changes of the first instance introduced by the write transactions.

### Claim 16 (depends on 9)

The computer program product of claim 9, the method including:
in response to receiving the query against the table, determining whether to execute the query against the first instance or against the second instance, wherein the method is implemented by a data processing system that includes and a replication module, a first database engine maintaining the first database, and a second database engine maintaining the second database.

### Claim 17

A computer system, the computer system comprising:
one or more computer processors;
at least one computer readable storage medium that is not a transitory signal per se; and
program instructions stored on the at least one computer readable storage medium, the program instructions being executable by at least one computer processor of the one or more computer processors to cause the at least one computer processor to perform a method comprising:
generating, by one or more processors, a table that exists as a first instance in a first database and as a second instance in a second database;
generating, by the one or more processors, a current replication batch of pooled changes of the first instance that committed at or before a first time;
propagating, by the one or more processors, changes specified in the current replication batch to the second instance;
assigning, by the one or more processors, a batch-ID of the current replication batch to the query;
executing, by the one or more processors, the query on the second instance using the batch-ID as a filter to exclude any changes that have an assigned batch-ID of a replication batch having committed later than the current replication batch; and
returning, by the one or more processors, results of the query execution on the second instance.

### Claim 18 (depends on 17)

The computer system of claim 17, the method comprising:
determining, by the one or more processors, the first time based on a commit time of at least one most recent write transaction that was committed before receipt of the query.

### Claim 19 (depends on 17)

The computer system of claim 17, the method comprising:
asynchronously replicating, by the one or more processors, the current replication batch to the second instance, thereby propagating the changes specified in the current replication batch to the second instance.

### Claim 20 (depends on 17)

The computer system of claim 17, the method comprising:
storing, by the one or more processors, each change that is specified in the current replication batch in the second instance.
