# US 2022/0284024 A1 · Methods and systems for transforming distributed database structure for reduced compute load

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

- Number: US 2022/0284024 A1
- Document ID: US20220284024A1
- Status: Published application
- Kind: A1
- Application number: 17/193,645
- Filed: 2021-03-05
- Published: 2022-09-08
- Earliest claimed: 2021-03-05
- Assignees: Insight Direct USA, Inc.
- Applicants: Insight Direct USA, Inc.
- Inventors: Edward Carl Tasker
- Web page: https://patentgrep.com/patent/US20220284024A1

## CPC

- G06F 16/211: {Schema design and management}
- G06F 16/24542: {Plan optimisation}
- 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 of improving compute performance of a distributed database system includes querying a control node of the distributed database system to ascertain a plurality of attributes characterizing an initial state of a table object in the distributed database system. Queries executed in the distributed database system are recorded. Based on these queries and at least some of the plurality of attributes, an candidate state of the table object with lower compute load than the initial state is generated. An executable transformation mapping the initial state of the table object to the candidate state is then assembled and applied to the table object.

## Claims

### Claim 1

A method of improving compute performance of a distributed database system, the method comprising:
querying a control node of the distributed database system to ascertain a plurality of attributes characterizing an initial state of a table object in the distributed database system;
recording queries executed in the distributed database system, the queries including calls of the table object;
generating a candidate state of the table object with lower compute load for the queries, relative to the initial state of the table object, based on the queries and at least a subset of the plurality of attributes;
assembling an executable transformation that maps the initial state of the table object to the candidate state of the table object; and
executing the executable transformation on the table object.

### Claim 2 (depends on 1)

The method of claim 1, wherein the executable transformation is a SQL script.

### Claim 3 (depends on 1)

The method of claim 1, further comprising generating an executable rollback that maps the candidate state of the table object to the initial state of the table object.

### Claim 4 (depends on 1)

The method of claim 1, further comprising:
generating a recommendation that documents the candidate state, the original state, and the expected compute efficiency benefit of the candidate state over the original state; and
triggering the execution of the executable transformation based on user approval of the recommendation.

### Claim 5 (depends on 1)

The method of claim 1, wherein the executable transformation alters at least one of a distribution type and a storage type of the table object.

### Claim 6 (depends on 5)

The method of claim 5, wherein the plurality of attributes includes table attributes characterizing the distribution type of the initial state of the table object.

### Claim 7 (depends on 5)

The method of claim 5, wherein the plurality of attributes includes data attributes characterizing the data storage type of the initial state of the table object.

### Claim 8 (depends on 1)

The method of claim 1, further comprising defining configuration values specifying at least one of:
a maximum row count for heap data storage;
a minimum row count for ColumnStore Index data storage;
a maximum table size for replicated table distribution;
a maximum skew tolerance for hash distributed tables; and
a maximum time limit for compressing Delta Store data in a CCI table;
wherein the determination of the candidate state of the table object is a function of the subset of the plurality of attributes, the queries, and the configuration values.

### Claim 9 (depends on 1)

The method of claim 1, wherein recording queries comprises logging and persistently archiving a history of queries executed by the database system on the table object.

### Claim 10 (depends on 9)

The method of claim 9, further comprising deriving workload attributes from the queries and the initial state of the table object, the workload attributes describing at least one of:
a number of times each column is used in a JOIN by the queries;
a number of times each column is used in a WHERE by the queries; and
a number of times each column is present in other table objects within the database system,
wherein the determination of the candidate state of the table object is a function of the subset of the plurality of attributes, the queries, and the workload attributes.

### Claim 11 (depends on 1)

The method of claim 1, wherein determining an candidate state of the table object with lower compute load for the queries, relative to the initial state of the table object, comprises identifying a table distribution requiring less data movement between multiple compute nodes, for the queries.

### Claim 12

A method of generating a computer-executable database structure transformation applicable to a table object in a distributed relational database, the method comprising:
assembling initial table attributes of the table object;
assembling workload attributes corresponding to queries on the table object;
defining preference conditions for table distribution and data types via configuration values;
determining whether the table object is non-optimal through comparison of the configuration values against the workload attributes and table attributes;
specifying an improved structure of the table object by distribution and data type, when the table object is non-optimal;
generating executable code mapping the table object to the improved structure.

### Claim 13 (depends on 12)

The method of claim 12, further comprising reducing the compute load of the table object by applying the executable code to the table object.

### Claim 14 (depends on 12)

The method of claim 12, wherein determining whether the table distribution is non-optimal includes evaluating whether a distribution type and a storage type of the table object are valid in view of the configuration values, the workload attributes, and the table attributes.

### Claim 15 (depends on 12)

The method of claim 12, further comprising updating the table attributes as the table object changes.

### Claim 16 (depends on 12)

The method of claim 12, wherein assembling the workload attributes comprises recording historical queries, and evaluating the frequency of JOIN and WHERE actions from the historical queries on a column-by-column basis with respect to the table object.

### Claim 17 (depends on 12)

The method of claim 12, wherein the table attributes comprise quantitative characteristics of the table object matched with the configuration values, such that determining whether the table object is non-optimal includes evaluating inequalities between multiple of the configuration values and corresponding of the table objects.

### Claim 18 (depends on 12)

The method of claim 12, further comprising assembling data attributes including:
a number of distinct values in each column;
a maximum number of occurrences of any single value in each column; and
a column datatype,
wherein determining whether the table object is non-optimal includes evaluation of CCI formatting of the table object by comparison of the data attributes, table attributes, and configuration values.

### Claim 19 (depends on 12)

The method of claim 12, further comprising:
applying the executable code to the table object, thereby updating the table object to the improved structure; and
tracking the table attributes and the workload attributes after applying the executable code to the table object.

### Claim 20 (depends on 12)

The method of claim 12, wherein, in the course of executing the queries, the improved structure of the table object exhibits at least one of:
reduced number of records scanned;
reduced volume of data transferred between nodes of the distributed relational database; and
reduced skew of records across storage distributions of the distributed relational database.
