IP Library Granted Patent US 12,259,884
Granted Patent B2
US 12,259,884 · App. 18/487,197 · Granted Mar 25, 2025

Histogram with integrated distinct value sketches

Inventors: Siomara Schulz (Walldorf, DE); Guido Moerkotte (Walldorf, DE); Norman May (Walldorf, DE)
Assignee: SAP SE
G06F16/24545G06F16/2365G06F16/2455G06F16/248G06F16/26
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 12,259,884
App. No.
18/487,197
Granted
Mar 25, 2025
Kind
B2
Abstract

Provided are systems and methods for creating histograms with distinct value sketches integrated therein and for query processing based on the histograms with distinct value sketches. In one example, the method may include storing a histogram that comprises a representation of a bucket of data from a database and that includes a distinct value sketch with a distinct value attribute that identifies an estimated number of distinct values within the bucket of data, receiving a database query, generating a query execution plan for the database query based on the distinct value attribute of the bucket within the distinct value sketch embedded within the histogram, and executing the database query on the bucket of data from the database based on the generated query execution plan.

Claims (38)

1. A computing system comprising:

a database configured to store a data set; and

a processor configured to:

process a user input comprising a threshold number of distinct values allowed per bucket of a plurality of buckets;

estimate how many of the distinct values are included in the data set;

dynamically divide the data set into the plurality of buckets that have different size widths based on the estimated distinct values that are included within the data set and the threshold number of distinct values allowed per bucket,

receive a database query request associated with the data set;

estimate processing times for the database to process a database query corresponding to the database query request based on distinct values of data in the plurality of buckets that have different size widths; and

execute the database query on the data set within the database based on the estimated processing times.

2. The computing system of claim 1 , wherein the processor is configured to dynamically divide the data set into the plurality of buckets based on a density of the estimated distinct values within data set.

3. The computing system of claim 1 , wherein the processor is configured to dynamically divide the data set into the plurality of buckets based on skewed frequencies of distinct values within the data set.

4. The computing system of claim 1 , wherein the processor is configured to embed identifiers of the plurality of buckets and different respective bucket sizes of the plurality of buckets within a histogram, and execute the database query based on the histogram.

5. The computing system of claim 1 , wherein the processor is configured to iteratively add distinct values to a bucket from among the plurality of buckets until a predetermined threshold of distinct values are included in the bucket, and in response, add a next distinct value to a next bucket among the plurality of buckets.

6. The computing system of claim 1 , wherein the processor is configured to dynamically determine the different size widths of the plurality of buckets, respectively, such that each bucket has a number of distinct values that is equal to or less than the predefined threshold.

7. The computing system of claim 1 , wherein the processor is configured to generate a bucket that comprises an amount of distinct values that is equal to a predetermined threshold of distinct values, and generate a next bucket among the plurality of buckets with less than the predetermined threshold of distinct values therein.

8. A method comprising:

processing a user input comprising a threshold number of distinct values allowed per bucket of a plurality of buckets;

estimating how many of the distinct values are included in a data set stored in a database;

dynamically dividing the data set into the plurality of buckets that have different size widths based on the estimated distinct values that are included within the data set and the threshold number of distinct values allowed per bucket;

receiving a database query request associated with the data set;

estimating processing times for the database to process a database query corresponding to the database query request based on distinct values of data in the plurality of buckets that have different size widths; and

executing the database query on the data set within the database based on the estimated processing times.

9. The method of claim 8 , wherein the dynamically dividing comprises dividing the data set into the plurality of buckets based on a density of the estimated distinct values within data set.

10. The method of claim 8 , wherein the dynamically dividing comprises dynamically dividing the data set into the plurality of buckets based on skewed frequencies of distinct values within the data set.

11. The method of claim 8 , wherein the method comprises embedding identifiers of the plurality of buckets and different respective bucket sizes of the plurality of buckets within a histogram, and executing the database query based on the histogram.

12. The method of claim 8 , wherein the method comprises iteratively adding distinct values to a bucket from among the plurality of buckets until a predetermined threshold of distinct values are included in the bucket, and in response, adding a next distinct value to a next bucket among the plurality of buckets.

13. The method of claim 8 , wherein the dynamically determining comprises dynamically determining the different size widths of the plurality of buckets, respectively, such that each bucket has a number of distinct values that is equal to or less than the predefined threshold.

14. The method of claim 8 , wherein the dynamically dividing comprises generating a bucket that comprises an amount of distinct values that is equal to a predetermined threshold of distinct values, and generating a next bucket among the plurality of buckets with less than the predetermined threshold of distinct values therein.

15. A non-transitory computer-readable medium comprising instructions which when executed by a processor cause a computer to perform:

processing a user input comprising a threshold number of distinct values allowed per bucket of a plurality of buckets;

estimating how many of the distinct values are included in a data set stored in a database;

dynamically dividing the data set into the plurality of buckets that have different size widths based on the estimated distinct values that are included within the data set and the threshold number of distinct values allowed per bucket;

receiving a database query request associated with the data set;

estimating processing times for the database to process a database query corresponding to the database query request based on distinct values of data in the plurality of buckets that have different size widths; and

executing the database query on the data set within the database based on the estimated processing times.

16. The non-transitory computer-readable medium of claim 15 , wherein the dynamically dividing comprises dividing the data set into the plurality of buckets based on a density of the estimated distinct values within data set.

17. The non-transitory computer-readable medium of claim 15 , wherein the dynamically dividing comprises dynamically dividing the data set into the plurality of buckets based on skewed frequencies of distinct values within the data set.

18. The non-transitory computer-readable medium of claim 15 , wherein the computer is further configured to perform embedding identifiers of the plurality of buckets and different respective bucket sizes of the plurality of buckets within a histogram, and executing the database query based on the histogram.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 16, 2023
From: SCHULZ, SIOMARA; MOERKOTTE, GUIDO; MAY, NORMAN
To: SAP SE
Reel/Frame 065225/0854 →
Continuity (2)
Continuation 17472839 · Sep 13, 2021
Related Publication 20240061841A1 · Feb 22, 2024
References Cited (15)
US 7707005B2 · Fraser et al. · 2010 [cited by applicant]
US 8433702B1 · Carrino · 2013 [cited by examiner]
US 10853368B2 · Behm · 2020 [cited by examiner]
US 20140114950A1 · Halverson et al. · 2014 [cited by applicant]
US 20140379693A1 · May · 2014 [cited by examiner]
US 20150149508A1 · Luo et al. · 2015 [cited by applicant]
US 20160110426A1 · Gaza et al. · 2016 [cited by applicant]
US 20180336252A1 · Joshi et al. · 2018 [cited by applicant]
US 20190384830A1 · Nazi et al. · 2019 [cited by applicant]
US 20200257684A1 · Erlandson et al. · 2020 [cited by applicant]
US 20220253425A1 · Budalakoti · 2022 [cited by examiner]
892 Form dated Nov. 21, 2022 which was received in connection with U.S. Appl. No. 17/472,839. [cited by applicant]
892 Form dated Mar. 9, 2023 which was received in connection with U.S. Appl. No. 17/472,839. [cited by applicant]
892 Form dated Jul. 27, 2023 which was received in connection with U.S. Appl. No. 17/472,839. [cited by applicant]
Notice of Allowance dated Jul. 27, 2023 which was received in connection with U.S. Appl. No. 17/472,839. [cited by applicant]