Harmonic Mean Event Count Estimation for Database Sampling Bias
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing database performance analysis methods, particularly frequency-based sampling, are biased towards long events, leading to unreliable estimates of event counts due to their inability to accurately account for short events.
Innovation Solution
The use of a harmonic mean method to determine event counts in database systems by capturing samples at a pre-defined frequency, identifying events, determining wait times, and grouping them based on defined wait time ranges, allowing for more accurate estimation of event counts through the summation of the maximum of either one or the ratio of the sampling frequency to the wait time for each event.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of manufacture
If frequency-based sampling method is used to estimate event counts, then the sampling process is simple, but the estimation is biased toward long events and becomes unreliable
Solution Approach 1:
The patent changes the calculation parameter from simple frequency multiplication to harmonic mean calculation. Instead of estimating event count as sampling frequency × sampled event time, the invention uses the harmonic mean of the sampling frequency and wait time ratios, which mathematically corrects the bias toward long events and provides accurate estimation for both short and long events.
2Ease of operation
If averaged sampled event times are used to estimate event counts, then the calculation is straightforward, but the results are not reliable due to bias toward long events
Solution Approach 1:
The invention transforms the calculation approach by changing from arithmetic mean (averaged sampled event times) to harmonic mean. This parameter change in the mathematical operation fundamentally alters the weighting behavior, making short events contribute appropriately to the estimate rather than being overwhelmed by long events.
3Loss of information
If grouping events by wait time ranges is implemented, then event distribution analysis is enhanced, but the processing complexity increases
Solution Approach 1:
The patent segments the continuous wait time data into discrete ranges (e.g., 0-1s, 1-5s, 5-10s, 10s+). This segmentation allows the system to categorize and analyze events by their wait time characteristics without requiring complex continuous analysis, thereby preserving distribution information while managing processing complexity through binning.
Data Source
AI summary
A method for determining event counts for a database system includes capturing samples for the active sessions based on a pre-defined sampling frequency and identifying events from the captured samples. The method further includes determining the wait time for each of the identified events and determining an event count for the active sessions using a harmonic mean. The harmonic mean is a summation of the maximum of either one or the ratio of the sampling frequency to the determined wait time for each of the identified events.


