# US 10,311,052 B2 · Query governor enhancements for databases integrated with distributed programming environments

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

- Number: US 10,311,052 B2
- Document ID: US10311052B2
- Status: Granted
- Kind: B2
- Application number: 15/600,461
- Filed: 2017-05-19
- Published: 2018-11-22
- Granted: 2019-06-04
- Earliest claimed: 2017-05-19
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Eric L. Barsness; Daniel E. Beuch; Alexander Cook; John M. Santosuosso
- Web page: https://patentgrep.com/patent/US10311052B2

## CPC

- G06F 16/24524: {Access plan code generation and invalidation; Reuse of access plans}
- G06F 9/5005: {to service a request}
- G06F 16/2453: Query optimisation
- G06F 16/24544: {Join order optimisation}
- G06F 16/24545: {Selectivity estimation or determination}
- G06F 16/24549: {Run-time optimisation}
- G06F 9/50: Allocation of resources, e.g. of the central processing unit [CPU]
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Systems, methods, and computer program products to perform an operation comprising receiving, by a database management system (DBMS), a query for execution, computing, by a query governor, a first resource consumption value for executing a first portion of the received query against a plurality of data tuples in an operator graph of a distributed application, and upon determining that the first resource consumption value does not exceed a first threshold value, executing the query by operation of one or more computer processors.

## Claims

### Claim 1

A method, comprising:
receiving, by a database management system (DBMS), a query for execution;
computing, by a query governor, a first resource consumption value for executing a first portion of the received query against a plurality of data tuples in an operator graph of a distributed application; and
upon determining that the first resource consumption value does not exceed a first threshold value, executing the query by operation of one or more computer processors.

### Claim 2 (depends on 1)

The method of claim 1, wherein the first resource consumption value is associated with one of: (i) an amount of time required to execute the first portion of the received query against the plurality of data tuples of the distributed application, and (ii) an amount of a computing resource used in executing the first portion of the received query against the plurality of data tuples in the operator graph of the distributed application, wherein the computing resource comprises at least one of: (i) a processor, (ii) a memory, (iii) a storage, (iv) a storage input/output (I/O), and (v) a network bandwidth.

### Claim 3 (depends on 1)

The method of claim 1, further comprising while executing the query:
computing, by the query governor, a second resource consumption value for executing the first portion of the received query against the plurality of data tuples in the operator graph of the distributed application; and
halting, by the query governor, the execution of the first portion of the query upon determining that the second resource consumption value exceeds a second threshold value.

### Claim 4 (depends on 1)

The method of claim 1, wherein the query governor computes the first resource consumption value based on one or more of: (i) historical data collected from queries previously executed by the DBMS against the plurality of data tuples in the operator graph of the distributed application, (ii) a value in the received query, and (iii) collected metadata describing the received query.

### Claim 5 (depends on 1)

The method of claim 1, wherein the distributed application comprises:
a plurality of processing elements comprising one or more operators, the operators configured to process data tuples, wherein the plurality of processing elements execute on at least one compute node of a plurality of compute nodes; and
the operator graph of a plurality of operators, the operator graph defining at least one execution path in which a first operator of the plurality of operators is configured to: (i) receive data tuples from at least one upstream operator and (ii) transmit data tuples to at least one downstream operator.

### Claim 6 (depends on 5)

The method of claim 5, wherein the first threshold value is specific to one or more of:
(i) the distributed application, (ii) one or more of the plurality of processing elements, (iii) one or more of the plurality of operators, and (iv) one or more of the plurality of compute nodes.

### Claim 7 (depends on 1)

The method of claim 1, further comprising:
computing, by the query governor, a second resource consumption value for executing the first portion of the received query against the plurality of data tuples in the operator graph of the distributed application; and
upon determining that the second resource consumption value exceeds a second threshold value, rejecting execution of the first portion of the query by the query governor,
wherein the first resource consumption value and the first threshold value correspond to a first resource, wherein the second resource consumption value and the second threshold value correspond to a second resource, different than the first resource.

### Claim 8

A computer program product, comprising:
a computer-readable storage medium having computer readable program code embodied therewith, the computer readable program code executable by a processor to perform an operation comprising:
receiving, by a database management system (DBMS), a query for execution;
computing, by a query governor, a first resource consumption value for executing a first portion of the received query against a plurality of data tuples in an operator graph of a distributed application; and
upon determining that the first resource consumption value does not exceed a first threshold value, executing the query by operation of one or more computer processors.

### Claim 9 (depends on 8)

The computer program product of claim 8, wherein the first resource consumption value is associated with one of: (i) an amount of time required to execute the received query against the plurality of data tuples of the distributed application, and (ii) an amount of a computing resource used in executing the received query against the plurality of data tuples in the operator graph of the distributed application, wherein the computing resource comprises at least one of: (i) a processor, (ii) a memory, (iii) a storage, (iv) a storage input/output (I/O), and (v) a network bandwidth.

### Claim 10 (depends on 8)

The computer program product of claim 8, the operation further comprising while executing the query:
computing, by the query governor, a second resource consumption value for executing the received query against the plurality of data tuples in the operator graph of the distributed application; and
halting, by the query governor, the execution of the query upon determining that the second resource consumption value exceeds a second threshold value.

### Claim 11 (depends on 8)

The computer program product of claim 8, wherein the query governor computes the first resource consumption value based on one or more of: (i) historical data collected from queries previously executed by the DBMS against the plurality of data tuples in the operator graph of the distributed application, (ii) a value in the received query, and (iii) collected metadata describing the received query.

### Claim 12 (depends on 8)

The computer program product of claim 8, wherein the distributed application comprises:
a plurality of processing elements comprising one or more operators, the operators configured to process data tuples, wherein the plurality of processing elements execute on at least one compute node of a plurality of compute nodes; and
the operator graph of a plurality of operators, the operator graph defining at least one execution path in which a first operator of the plurality of operators is configured to: (i) receive data tuples from at least one upstream operator and (ii) transmit data tuples to at least one downstream operator.

### Claim 13 (depends on 12)

The computer program product of claim 12, wherein the first threshold value is specific to one or more of: (i) the distributed application, (ii) one or more of the plurality of processing elements, (iii) one or more of the plurality of operators, and (iv) one or more of the plurality of compute nodes.

### Claim 14 (depends on 8)

The computer program product of claim 8, the operation further comprising:
computing, by the query governor, a second resource consumption value for executing the received query against the plurality of data tuples in the operator graph of the distributed application; and
upon determining that the second resource consumption value exceeds a second threshold value, rejecting execution of the query by the query governor,
wherein the first resource consumption value and the first threshold value correspond to a first resource, wherein the second resource consumption value and the second threshold value correspond to a second resource, different than the first resource.

### Claim 15

A system, comprising:
a processor; and
a memory storing one or more instructions which, when executed by the processor, performs an operation comprising:
receiving, by a database management system (DBMS), a query for execution;
computing, by a query governor, a first resource consumption value for executing a first portion of the received query against a plurality of data tuples in an operator graph of a distributed application; and
upon determining that the first resource consumption value does not exceed a first threshold value, executing the query by operation of one or more computer processors.

### Claim 16 (depends on 15)

The system of claim 15, wherein the first resource consumption value is associated with one of: (i) an amount of time required to execute the received query against the plurality of data tuples of the distributed application, and (ii) an amount of a computing resource used in executing the received query against the plurality of data tuples in the operator graph of the distributed application, wherein the computing resource comprises at least one of: (i) a processor, (ii) a memory, (iii) a storage, (iv) a storage input/output (I/O), and (v) a network bandwidth.

### Claim 17 (depends on 15)

The system of claim 15, the operation further comprising while executing the query:
computing, by the query governor, a second resource consumption value for executing the received query against the plurality of data tuples in the operator graph of the distributed application; and
halting, by the query governor, the execution of the query upon determining that the second resource consumption value exceeds a second threshold value.

### Claim 18 (depends on 15)

The system of claim 15, wherein the query governor computes the first resource consumption value based on one or more of: (i) historical data collected from queries previously executed by the DBMS against the plurality of data tuples in the operator graph of the distributed application, (ii) a value in the received query, and (iii) collected metadata describing the received query.

### Claim 19 (depends on 15)

The system of claim 15, wherein the distributed application comprises:
a plurality of processing elements comprising one or more operators, the operators configured to process data tuples, wherein the plurality of processing elements execute on at least one compute node of a plurality of compute nodes; and
the operator graph of a plurality of operators, the operator graph defining at least one execution path in which a first operator of the plurality of operators is configured to: (i) receive data tuples from at least one upstream operator and (ii) transmit data tuples to at least one downstream operator.

### Claim 20 (depends on 19)

The system of claim 19, wherein the first threshold value is specific to one or more of:
(i) the distributed application, (ii) one or more of the plurality of processing elements, (iii) one or more of the plurality of operators, and (iv) one or more of the plurality of compute nodes.
