# US 2016/0253380 A1 · Database query optimization

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

- Number: US 2016/0253380 A1
- Document ID: US20160253380A1
- Status: Published application
- Kind: A1
- Application number: 14/632,721
- Filed: 2015-02-26
- Published: 2016-09-01
- Earliest claimed: 2015-02-26
- Assignees: Red Hat, Inc.
- Applicants: Red Hat, Inc.
- Inventors: Filip Nguyen; Filip Elias
- Web page: https://patentgrep.com/patent/US20160253380A1

## CPC

- G06F 16/2453: Query optimisation
- G06F 16/2471: {Distributed queries}
- G06F 16/284: {Relational databases}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Various examples are directed to systems and methods for managing a database comprising data items from a constituent source. A federation engine may receive from a first client a first client query. The first client query may reference a data item stored at a constituent data source. The federation engine may determine that the first client query is a complex client query and send the first client query to an administrator system.

## Claims

### Claim 1

A system for managing a database comprising data from a source outside the database, the system comprising:
at least one processor programmed to execute a federation engine, wherein the federation engine is configured to:
receive, from a first client, a first client query;
process the first client query, wherein processing the first client query comprises sending a federation engine query to at least one constituent data source comprising a value for the data item;
determine that the first client query is a complex query, wherein determining that the first client query is a complex query comprises determining that a time to execute the first client query depends on a size of the constituent data source;
receive from an administrator system a plurality of potential substitute queries for the first client query;
receive a plurality of subsequent instances of the first client query;
process the plurality of subsequent instances of the first client query, wherein processing each of the plurality of subsequent instances of the first client query comprises:
randomly selecting a query from the group consisting of the plurality of potential substitute queries and the first client query; and
process the selected query; and
record data describing the execution of the selected query;
send to the administrator system data describing the processing of the plurality of subsequent instances of the first client query;
receiving, from the administrator system, a selected substitute query selected from the plurality of potential substitute queries;
receive from the at least one client an additional instance of the complex query; and
process the selected substitute query.

### Claim 2 (depends on 1)

The system of claim 1, wherein processing the plurality of subsequent instances of the first client query comprises processing the complex query and each of the plurality of substitute queries about the same number of times.

### Claim 3 (depends on 1)

The system of claim 1, wherein determining that the first client query is a complex client query comprises determining that the constituent data source exceeds a threshold size.

### Claim 4

A system for managing a database comprising data from a source outside the database, the system comprising:
at least one processor programmed to execute a federation engine, wherein the federation engine is configured to:
receive from a first client a first client query, wherein the first client query references a data item stored at a constituent data source;
determine that the first client query is a complex client query; and
send the first client query to an administrator system.

### Claim 5 (depends on 4)

The system of claim 4, wherein determining that the first client query is a complex client query comprises determining that a time to execute the first client query depends on a size of the constituent data source.

### Claim 6 (depends on 4)

The system of claim 4, wherein determining that the first client query is a complex client query comprises determining that the constituent data source exceeds a threshold size.

### Claim 7 (depends on 4)

The system of claim 4, wherein determining that the first client query is a complex client query comprises:
determining a size of the constituent data source;
selecting a complexity threshold based on the size of the constituent data source; and
determining whether the first client query exceeds the selected complexity threshold.

### Claim 8 (depends on 4)

The system of claim 4, wherein the complexity threshold indicates an order of a dependence between an execution time of the first client query and the size of the constituent database.

### Claim 9 (depends on 4)

The system of claim 4, wherein the federation engine is further configured to process the first client query, wherein processing the first client query comprises:
sending a federation engine query to the constituent data source;
receiving a reply to the federation engine query, the reply to the federation engine query comprising a value for the data item; and
send the first client a reply to the first client query, the reply to the first client query comprising the value for the data item.

### Claim 10 (depends on 4)

The system of claim 4, wherein the federation engine is further configured to:
receive from an administrator system a plurality of potential substitute queries for the first client query;
receive a plurality of subsequent instances of the first client query;
process the plurality of subsequent instances of the first client query, wherein processing each of the plurality of subsequent instances of the first client query comprises:
randomly selecting a query from the group consisting of the plurality of potential substitute queries and the first client query; and
process the selected query; and
record data describing the execution of the selected query;
send to the administrator system data describing the processing of the plurality of subsequent instances of the first client query;
receiving, from the administrator system, a selected substitute query selected from the plurality of potential substitute queries;
receive from the at least one client an additional instance of the complex query; and
process the selected substitute query.

### Claim 11 (depends on 4)

The system of claim 4, wherein the federation engine is further configured to:
determine that the first client query has an associated selected substitute query; and
process the selected substitute query.

### Claim 12 (depends on 4)

The system of claim 4, wherein the federation engine is further configured to:
determine that the first client does not have an associated selected substitute query;
determine that the first client does have at least one associated potential substitute query;
randomly select a query from the group consisting of the first query and the at least one associated potential substitute query;
process the randomly selected query; and
provide data describing execution of the randomly selected query to the administrator system.

### Claim 13

A method for managing a database comprising data from a source outside the database, the method comprising:
receiving, by a federation engine and from a first client, a first client query, wherein the first client query references a data item stored at a constituent data source;
determining, by the federation engine, that the first client query is a complex client query; and
sending, by the federation engine, the first client query to an administrator system.

### Claim 14 (depends on 13)

The method of claim 13, wherein determining that the first client query is a complex client query comprises determining that a time to execute the first client query depends on a size of the constituent data source.

### Claim 15 (depends on 13)

The method of claim 13, wherein determining that the first client query is a complex client query comprises determining that the constituent data source exceeds a threshold size.

### Claim 16 (depends on 13)

The method of claim 13, wherein determining that the first client query is a complex client query comprises:
determining a size of the constituent data source;
selecting a complexity threshold based on the size of the constituent data source; and
determining whether the first client query exceeds the selected complexity threshold.

### Claim 17 (depends on 13)

The method of claim 13, wherein the complexity threshold indicates an order of a dependence between an execution time of the first client query and the size of the constituent database.

### Claim 18 (depends on 13)

The method of claim 13, further comprising processing the first client query, wherein processing the first client query comprises:
sending a federation engine query to the constituent data source;
receiving a reply to the federation engine query, the reply to the federation engine query comprising a value for the data item; and
send the first client a reply to the first client query, the reply to the first client query comprising the value for the data item.

### Claim 19 (depends on 13)

The method of claim 13, further comprising:
receiving, by the federation engine and from an administrator system, a plurality of potential substitute queries for the first client query;
receiving, by the federation engine, a plurality of subsequent instances of the first client query;
processing, by the federation engine, the plurality of subsequent instances of the first client query, wherein processing each of the plurality of subsequent instances of the first client query comprises:
randomly selecting a query from the group consisting of the plurality of potential substitute queries and the first client query; and
process the selected query; and
record data describing the execution of the selected query;
sending, by the federation engine to the administrator system, data describing the processing of the plurality of subsequent instances of the first client query;
receiving, by the federation engine and from the administrator system, a selected substitute query selected from the plurality of substitute queries;
receiving, by the federation engine and from the at least one client an additional instance of the complex query; and
processing, by the federation engine, the selected substitute query.

### Claim 20 (depends on 13)

The method of claim 13, further comprising:
determining, by the federation engine that the first client query has an associated selected substitute query; and
processing, by the federation engine, the selected substitute query.
