# US 12,762,128 B2 · Database system optimizing operator flow for performing aggregation based on power utilization

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

- Number: US 12,762,128 B2
- Document ID: US12762128B2
- Status: Granted
- Kind: B2
- Application number: 18/766,114
- Filed: 2024-07-08
- Published: 2024-11-07
- Granted: 2026-10-13
- Earliest claimed: 2023-05-01
- Assignees: Ocient Holdings LLC
- Applicants: Ocient Holdings LLC
- Inventors: Anna Veselova; Greg R. Dhuse
- Web page: https://patentgrep.com/patent/US12762128B2

## CPC

- G06F 16/24556: {Aggregation; Duplicate elimination}
- G06F 16/24537: {of operators}
- G06F 16/24544: {Join order optimisation}
- G06F 16/2456: {Join operations}
- G06F 16/248: Presentation of query results
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A database system is operable to generate an initial query operator execution that includes an IO operator for execution serially before an aggregation operator indicating performance of an aggregation. The initial query operator execution flow is converted into an updated query operator execution flow semantically equivalent to the initial query operator execution flow based on updating the IO operator to include the performance of the aggregation and adding a re-aggregation operator serially after the IO operator. A corresponding query is executed by applying the updated query operator execution flow based on executing, via each of a plurality of parallelized resources, the IO operator generate corresponding sub-aggregation output via performance of the aggregation, and executing the re-aggregation operator upon data blocks generated based on execution of the IO operator across the plurality of parallelized resources.

## Claims

### Claim 1

A database system comprises:
a plurality of computing device clusters, wherein a computing device cluster of the plurality of computing device clusters includes a plurality of computing devices, wherein one or more computing devices of the computing device cluster is operably coupled to:
obtain an initial query that includes an initial plurality of query operations, wherein the plurality of query operations has an initial query flow, wherein the initial query is regarding data of a dataset, wherein the dataset includes a plurality of rows of columnar data, wherein the columnar data includes a plurality of columns of data;
obtain an initial query plan for the initial query, wherein the initial query plan includes an input/output (IO) set of query operations of the plurality of query operations assigned to a set of input/output (IO) computing resources of the database system and an inner set of query operations of the plurality of query operations assigned to a set of computing resources of the database system, wherein the inner set of query operations includes an aggregation operation, wherein the aggregation operation is ordered to be executed subsequent to the IO set of query operations, and wherein the aggregation operation creates a new data value from an existing data value;
determining, based on a set of aggregation push-down conditions, whether the aggregation operation can be push-down into the IO set of query operations; and
when the aggregation operation satisfies the set of aggregation push-down conditions, optimize the initial query plan by:
including the aggregation operation in the IO set of query operations;
deleting the aggregation operation from the inner set of query operations to produce an optimized query plan.

### Claim 2 (depends on 1)

The database system of claim 1, wherein the set of aggregation push-down conditions includes:
a condition requiring that the aggregation operator is not paired with an ORDER BY clause.

### Claim 3 (depends on 1)

The database system of claim 1, wherein the set of aggregation push-down conditions includes at least one of:
an input type condition requiring input to the IO operator and the aggregation operator be one of a set of data types; and
an output type condition requiring output of the IO operator and the aggregation operator be one of the set of data types.

### Claim 4 (depends on 1)

The database system of claim 1, wherein the set of aggregation push-down conditions includes:
an aggregation type condition requiring the aggregation be one of a set of aggregation operators.

### Claim 5 (depends on 1)

The database system of claim 1, wherein the aggregation operators includes a set of operators that is one or more of: a count aggregation, a summation aggregation, a product aggregation, a maximum aggregation, or a minimum aggregation.

### Claim 6 (depends on 1)

The database system of claim 1, wherein the one or more computing devices further optimizes the initial query plan by:
adding a higher-order aggregation into the inner set of query operations.

### Claim 7

A non-transitory computer-readable storage medium comprises:
a first memory section that stores operational instructions that, when executed by one or more computing devices of a computing device cluster of a plurality of computing device clusters, causes the one or more computing devices to:
obtain an initial query that includes an initial plurality of query operations, wherein the plurality of query operations has an initial query flow, wherein the initial query is regarding data of a dataset, wherein the dataset includes a plurality of rows of columnar data, wherein the columnar data includes a plurality of columns of data;
obtain an initial query plan for the initial query, wherein the initial query plan includes an input/output (IO) set of query operations of the plurality of query operations assigned to a set of input/output (IO) computing resources of a database system and an inner set of query operations of the plurality of query operations assigned to a set of computing resources of the database system, wherein the inner set of query operations includes an aggregation operation, wherein the aggregation operation is ordered to be executed subsequent to the IO set of query operations, and wherein the aggregation operation creates a new data value from an existing data value; and
a second memory section that stores operational instructions that, when executed by the one or more computing devices, causes the one or more computing devices to:
determining, based on a set of aggregation push-down conditions, whether the aggregation operation can be push-down into the IO set of query operations; and
when the aggregation operation satisfies the set of aggregation push-down conditions, optimize the initial query plan by:
including the aggregation operation in the IO set of query operations;
delete the aggregation operation from the inner set of query operations to produce an optimized query plan.

### Claim 8 (depends on 7)

The non-transitory computer-readable storage medium of claim 7, wherein the set of aggregation push-down conditions includes:
a condition requiring that the aggregation operator is not paired with an ORDER BY clause.

### Claim 9 (depends on 7)

The non-transitory computer-readable storage medium of claim 7, wherein the set of aggregation push-down conditions includes at least one of:
an input type condition requiring input to the IO operator and the aggregation operator be one of a set of data types; and
an output type condition requiring output of the IO operator and the aggregation operator be one of the set of data types.

### Claim 10 (depends on 7)

The non-transitory computer-readable storage medium of claim 7, wherein the set of aggregation push-down conditions includes:
an aggregation type condition requiring the aggregation be one of a set of aggregation operators.

### Claim 11 (depends on 7)

The non-transitory computer-readable storage medium of claim 7, wherein the aggregation operators includes a set of operators that is one or more of: a count aggregation, a summation aggregation, a product aggregation, a maximum aggregation, or a minimum aggregation.

### Claim 12 (depends on 7)

The non-transitory computer-readable storage medium of claim 7, wherein the second memory section further stores operational instructions that, when executed by the one or more computing devices, causes the one or more computing devices to further optimizes the initial query plan by:
adding a higher-order aggregation into the inner set of query operations.
