# US 2018/0322154 A1 · Database performance tuning framework

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

- Number: US 2018/0322154 A1
- Document ID: US20180322154A1
- Status: Published application
- Kind: A1
- Application number: 15/667,405
- Filed: 2017-08-02
- Published: 2018-11-08
- Earliest claimed: 2017-05-05
- Assignees: ServiceNow, Inc.
- Applicants: ServiceNow, Inc.
- Inventors: Brent Bahry
- Web page: https://patentgrep.com/patent/US20180322154A1

## CPC

- G06F 16/2272: {Management thereof}
- G06F 16/24542: {Plan optimisation}
- G06F 16/2462: {Approximate or statistical queries}
- G06F 17/18: for evaluating statistical data {, e.g. average values, frequency distributions, probability functions, regression analysis (forecasting specially adapted for a specific administrative, business or logistic context G06Q10/04)}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Techniques related to a database performance tuning framework are disclosed. The techniques include a system for improving performance of a database query, the system configured to generate one or more query execution time statistics relating to a database query operation performed by a database in response to a received query, store the query execution time statistics, determine the database query operation is slow based on the stored query execution time statistics, generate one or more database statistics based on the contents of the database, generate a suggested index using one or more of the generated database statistics, create the suggested index, determine another one or more query execution time statistics for the database query operation after creating the suggested index, and retain the suggested index based on a comparison of the stored query execution time statistics and the another query execution time statistics.

## Claims

### Claim 1

A system for improving performance of a database query, comprising:
a non-transitory memory; and
one or more hardware processors configured to read instructions from the non-transitory memory to cause the system to:
generate one or more query execution time statistics relating to a database query operation performed by a database in response to a received query;
store the query execution time statistics;
determine the database query operation is slow based on the stored query execution time statistics;
generate one or more database statistics based on the contents of the database;
generate a suggested index using one or more of the generated database statistics;
create the suggested index;
determine another one or more query execution time statistics for the database query operation after creating the suggested index; and
retain the suggested index based on a comparison of the stored query execution time statistics and the another query execution time statistics.

### Claim 2 (depends on 1)

The system of claim 1, wherein the suggested index is created in response to an indication received from a user to create the suggested index.

### Claim 3 (depends on 1)

The system of claim 1, wherein the database statistics comprise distinct cardinality information calculated based on data within in the database.

### Claim 4 (depends on 1)

The system of claim 1, wherein the comparison of the stored query execution time statistics and another query execution time indicates that the query executes faster after the creation of the suggested index by at least a threshold amount of time.

### Claim 5 (depends on 1)

The system of claim 1, wherein the comparison of the stored query execution time statistics and the another query execution time statistics indicates that the query executes faster after the creation of the suggested index by at least a threshold percentage.

### Claim 6 (depends on 1)

The system of claim 1, further comprising:
grouping two or more queries together based on the characteristics of the queries; and
determining the query execution time statistic based on the grouped queries.

### Claim 7 (depends on 6)

The system of claim 6, wherein the query execution time statistic is one of an average query execution time for the query or a total query execution time for the query.

### Claim 8

A method for improving performance of a database query, comprising:
generating one or more query execution time statistics relating to a database query operation performed by a database in response to a received query;
storing the query execution time statistics;
determining the database query operation is slow based on the stored query execution time statistics;
generating one or more database statistics based on the contents of the database;
generate a suggested index using one or more of the generated database statistics;
creating the suggested index
determining another one or more query execution time statistics for the database query operation after creating the suggested index; and
retaining the suggested index based on a comparison of the stored query execution time statistics and the another query execution time statistics.

### Claim 9 (depends on 8)

The method of claim 8, wherein the suggested index is created in response to an indication received from a user to create the suggested index.

### Claim 10 (depends on 8)

The method of claim 8, wherein the database statistics comprise a distinct cardinality information calculated based on data within in the database.

### Claim 11 (depends on 8)

The method of claim 8, wherein the comparison of the stored query execution time statistics and the another query execution time statistics indicates that the query executes faster after the creation of the suggested index by at least a threshold amount of time.

### Claim 12 (depends on 8)

The method of claim 8, wherein the comparison of the stored query execution time statistics and the another query execution time statistics indicates that the query executes faster after the creation of the suggested index by at least a threshold percentage.

### Claim 13 (depends on 8)

The method of claim 8, further comprising:
grouping two or more queries together based on the characteristics of the queries; and
determining the query execution time statistic based on the grouped queries.

### Claim 14 (depends on 13)

The method of claim 13, wherein the query execution time statistic is one of an average query execution time for the query or a total query execution time for the query.

### Claim 15

A computer readable medium containing instructions that, when executed by a processor cause a programmable device:
generate one or more query execution time statistics relating to a database query operation performed by a database, in response to a received query;
store the query execution time statistics;
determine the database query operation is slow based on the stored query execution time statistics;
generate one or more database statistics based on the contents of the database;
generate a suggested index using one or more of the generated database statistics;
create the suggested index;
determine another one or more query execution time statistics for the database query operation after creating the suggested index; and
retain the suggested index based on a comparison of the stored query execution time statistics and the another query execution time statistics.

### Claim 16 (depends on 15)

The computer readable medium of claim 15, wherein the suggested index is created in response to an indication received from a user to create the suggested index.

### Claim 17 (depends on 15)

The computer readable medium of claim 15, wherein one or more database statistics comprise a distinct cardinality information calculated based on data within in the database.

### Claim 18 (depends on 15)

The computer readable medium of claim 15, wherein the comparison of the stored query execution time statistics and the another query execution time statistics indicates that the query executes faster after the creation of the suggested index by at least a threshold amount of time.

### Claim 19 (depends on 15)

The system of claim 15, wherein the comparison of the stored query execution time statistics and the another query execution time statistics indicates that the other query executes faster after the creation of the suggested index by at least a threshold percentage.

### Claim 20 (depends on 15)

The system of claim 15, further comprising:
grouping two or more queries together based on the characteristics of the queries; and
determining the query execution time statistic based on the grouped queries.
