Incremental maintenance of an approximate histogram in a database system
Abstract
Techniques for maintaining an approximate histogram of a relation in a database, in the presence of updates to the relation. The histogram includes a number of subsets, or "buckets," each representing at least one possible value of an attribute of the relation. Each of the subsets has a count associated therewith indicative of the frequency of occurrence of the corresponding value of the attribute. After an update to the relation, the counts associated with the subsets are compared to a threshold. If the count associated with a given subset exceeds the threshold, the given subset is separated at its median into two separate subsets. After the separation operation, the two subsets with the lowest counts are combined such that a constant number of subsets are maintained in the histogram, if the total combined count of the subsets does not exceed the threshold. If no two subsets have a total combined count which does not exceed the threshold, the histogram is recomputed from a random sample of the relation. The invention substantially reduces the number of times the histogram must be recomputed from the random sample, and is particularly well-suited for use with approximate eq
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 6 · Forward citations: 113.
Claims (2 — 1 Independent, 1 Dependent)
- Claim 1Independent Claim
A method of maintaining a histogram for at least one attribute of a relation in a database, the histogram including a plurality of subsets each representing at least one possible value of the attribute, each of the subsets having a count associated therewith indicative of the frequency of occurrence of the corresponding value of the attribute, the method comprising the steps of: comparing the counts associated with the subsets to a threshold after an update to the relation; and separating a given one of the subsets into at least two separate subsets if the count associated with the given sub
- Claim 2Depends on #1
The method of claim 1 further including the step of merging at least two of the subsets to form a single subset after the separating step, such that the histogram maintains a fixed number of sub
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗
Cited By — Indexed Forward Citations (15 of 113 total)
References Cited — Backward Prior Art (6)
Non-Patent Literature (5)
- N.Ramesh et al., Thresholding based on histogram approximation, IEE Proc. Vis.Image Signal Process;I vol. 142, No. 5, 271 279, Oct. 1995.
- N.Ramesh et al., Thresholding based on histogram approximation, IEE Proc.-Vis.Image Signal Process;I vol. 142, No. 5, 271-279, Oct. 1995.
- Prasanna K. Sahoo et al., Threshold selection based on histogram modeling, IEEE 1992 and 351 356, Aug. 1992.
- Prasanna K. Sahoo et al., Threshold selection based on histogram modeling, IEEE 1992 and 351-356, Aug. 1992.
- V. Poosala, Y. Ioannidis, P. Haas and E. Shekita, "Improved histograms for selectivity estimation of range predicates," Proc. of ACM Sigmod Conf., pp. 294-305, Jun. 1996.