IP Library Granted Patent US 10,922,314
Granted Patent B2
US 10,922,314 · App. 15/563,124 · Granted Feb 16, 2021

Incrementally updating a database statistic

Inventors: QiFan Chen (Austin, TX); Choudur Lakshminarayan (Austin, TX)
Assignee: MICRO FOCUS LLC
G06F16/24545G06F16/2358G06F16/2379G06F16/2455G06F17/18
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,922,314
App. No.
15/563,124
Filed
Sep 29, 2017
Granted
Feb 16, 2021
Kind
B2
Art Unit
2169
USPC
707/625
Abstract

A technique includes determining a statistic for values associated with at least one column of a database based at least in part on a first sample of the values; and determining a degree of change in a second sample of the values relative to the first sample; and estimating a count of unique values for the column(s). The estimation of the count of unique values includes selectively incrementally updating the statistic using the second sample based at least in part on the determined degree of change; and basing estimation of the count at least in part on the updated statistic. The technique further includes processing a query to the database based at least in part on the count.

Claims (45)

1. A non-transitory computer readable storage medium storing instructions that, when executed by a computer, cause the computer to:

access a plurality of datasets sampled from a column of a database at different times;

compare a first skew associated with a first dataset of the plurality of datasets to a second skew associated with a second dataset of the plurality of datasets, based on a comparison of a first value for a statistic derived from the first dataset with a second value for the statistic derived from the second dataset, wherein the first skew or the second skew is a degree of change in a respective dataset;

based on the comparison of the first skew to the second skew, selectively combine a subset of data from the first dataset and a subset of data from the second dataset to provide a combined subset of data;

use the combined subset of data to determine a third value for the statistic;

based on the comparison of the first skew to the second skew, use the second value or the third value for the statistic to estimate a count of unique values in the column of the database;

receive a query to retrieve data from the database;

generate an execution plan for the query based on the count of unique values in the column; and

execute the query based on the execution plan to provide query results.

2. The non-transitory computer readable storage medium of claim 1 , wherein the instructions, when executed by the computer, further cause the computer to apply a linear weighted combination estimator to estimate the count of unique values using the second value or the third value for the statistic.

3. The non-transitory computer readable storage medium of claim 1 , wherein the statistic comprises a frequency of unique values appearing in the column.

4. The non-transitory computer readable storage medium of claim 1 , wherein, to generate the execution plan for the query, the instructions further cause the computer to perform selecting operators and selecting an operator execution order for the query based on the count of unique values in the column.

5. The non-transitory computer readable storage medium of claim 1 , wherein the instructions, when executed by the computer, further cause the computer to determine a probability of rows of the database being sampled more than once among at least two datasets of the plurality of datasets and further base selective combination of the subsets of data from the first and second datasets based on the probability.

6. A system comprising:

at least one hardware processor; and

a memory storing instructions that when executed cause the at least one hardware processor to:

access a plurality of datasets sampled from a column of a database, each dataset of the plurality of datasets being associated with a different sampling period of a plurality of sampling periods;

compare a first degree of change associated with a first dataset of the plurality of datasets to a second degree of change associated with a second dataset of the plurality of datasets based on a comparison of a first value for a statistic derived from the first dataset with a second value for the statistic derived from the second dataset;

based on the comparison of the first decree of change to the second degree of change, selectively combine a subset of data from the first dataset and a subset of data from the second dataset to provide a combined subset of data;

use the combined subset of data to determine a third value for the statistic;

based on the comparison, use the second value or the third value for the statistic to estimate a count of unique values in the column of the database;

receive a query to retrieve data from the database;

generate an execution plan for the query based on the count of unique values in the column; and

execute the query based on the execution plan to provide query results.

7. The system of claim 6 , wherein: the statistic comprises a frequency of unique values appearing in the column; and the instructions, when executed, cause the at least one hardware processor to: determine a first value for the frequency of unique values appearing in the column based on the first dataset, and determine a second value for the frequency of unique values appearing in the column based on the second dataset;

determine a difference between the first and second values;

determine a standard deviation for the frequency of unique values appearing in the column based on the difference between the first and second values; and determine degree of change based on the first value, the second value and the standard deviation.

8. The system of claim 6 , wherein the instructions, when executed, cause the at least one hardware processor to:

determine a probability of data entries of the database being sampled more than once in multiple datasets of the plurality of datasets, and

in response to the probability, discard the combined subset of data and generate the third value for the statistic based on the subset of data from the second dataset which is associated with a most recent sampling period.

9. The system of claim 6 , wherein the instructions, when executed, cause the at least one hardware processor to apply a linear weighted combination estimator to estimate the count of unique values in the column using the second value or the third value for the statistic.

10. The system of claim 6 , wherein the statistic indicates a frequency of unique values appearing in the column.

11. A method comprising:

accessing, by a processor, a plurality of datasets sampled from a column of a database at different times;

comparing, by the processor, a first skew associated with a first dataset of the plurality of datasets to a second skew associated with a second dataset of the plurality of datasets, based on a comparison of a first value for a statistic derived from the first dataset with a second value for the statistic derived from the second dataset, wherein the first skew or the second skew is a degree of change in a respective dataset;

based on the comparison of the first skew to the second skew, selectively combining, by the processor, subsets of data from the first dataset and from the second dataset of the plurality of datasets to provide a combined subset of data;

using, by the processor, the combined subset of data to determine a third value for the statistic;

based on the comparison of the first skew to the second skew, using, by the processor, the second value or the third value for the statistic to estimate a count of unique values associated with the column;

receiving a query to retrieve data from the database;

generating, by the processor, an execution plan for the query based on the count of unique values in the column; and

executing, by the processor, the query based on the execution plan to provide query results.

12. The method of claim 11 , further comprising applying a linear weighted combination estimator to estimate the count of unique values in the column using the second value or the third value for the statistic.

13. The method of claim 11 , wherein the statistic indicates a frequency of unique values appearing in the column.

14. The method of claim 11 , wherein generating the execution plan for the query comprises selecting operators and selecting an operator execution order for the query based on the count of unique values in the column.

15. The method of claim 11 , further comprising determining a probability of rows of the database being sampled more than once among at least two datasets of the plurality of datasets and further selectively combining the subset of data from the first dataset and the subset of data from the second dataset based on the probability.

Assignments (9)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 28, 2026
From: MICRO FOCUS LLC
To: ROCKET SOFTWARE, INC.
Reel/Frame 075795/0114 →
RELEASE OF SECURITY INTEREST REEL/FRAME 052295/0041 Recorded Feb 2, 2023
From: JPMORGAN CHASE BANK, N.A.
To: MICRO FOCUS LLC; MICRO FOCUS SOFTWARE INC. (F/K/A NOVELL, INC.); NETIQ CORPORATION
Reel/Frame 062625/0754 →
RELEASE OF SECURITY INTEREST REEL/FRAME 052294/0522 Recorded Feb 2, 2023
From: JPMORGAN CHASE BANK, N.A.
To: MICRO FOCUS LLC; MICRO FOCUS SOFTWARE INC. (F/K/A NOVELL, INC.); NETIQ CORPORATION
Reel/Frame 062624/0449 →
SECURITY AGREEMENT Recorded Apr 2, 2020
From: MICRO FOCUS LLC; BORLAND SOFTWARE CORPORATION; MICRO FOCUS SOFTWARE INC.; NETIQ CORPORATION; MICRO FOCUS (US), INC.
To: JPMORGAN CHASE BANK, N.A.
Reel/Frame 052294/0522 →
SECURITY AGREEMENT Recorded Apr 2, 2020
From: MICRO FOCUS LLC; BORLAND SOFTWARE CORPORATION; MICRO FOCUS SOFTWARE INC.; NETIQ CORPORATION; MICRO FOCUS (US), INC.
To: JPMORGAN CHASE BANK, N.A.
Reel/Frame 052295/0041 →
CHANGE OF NAME Recorded Aug 8, 2019
From: ENTIT SOFTWARE LLC
To: MICRO FOCUS LLC
Reel/Frame 050004/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 29, 2017
From: HEWLETT PACKARD ENTERPRISE DEVELOPMENT LP
To: ENTIT SOFTWARE LLC
Reel/Frame 044049/0103 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 29, 2017
From: CHEN, QIFAN; LAKSHMINARAYAN, CHOUDUR
To: HEWLETT-PACKARD DEVELOPMENT COMPANY, L.P.
Reel/Frame 043740/0367 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 29, 2017
From: HEWLETT-PACKARD DEVELOPMENT COMPANY, L.P.
To: HEWLETT PACKARD ENTERPRISE DEVELOPMENT LP
Reel/Frame 044106/0001 →
Continuity (1)
Related Publication 20180107715A1 · Apr 19, 2018