diff --git a/pkg/sql/appstatspb/app_stats.go b/pkg/sql/appstatspb/app_stats.go index 9d0d539de834..11e1d0477ed1 100644 --- a/pkg/sql/appstatspb/app_stats.go +++ b/pkg/sql/appstatspb/app_stats.go @@ -285,24 +285,4 @@ func (s *LatencyInfo) Add(other LatencyInfo) { if other.Max > s.Max { s.Max = other.Max } - s.checkPercentiles() -} - -// checkPercentiles is a patchy solution and not ideal. -// When the execution count for a period is smaller than 500, -// the percentiles sample is including previous aggregation periods, -// making the p99 possible be greater than the max. -// For now, we just do a check and update the percentiles to the max -// possible size. -// TODO(maryliag): use a proper sample size (#99070) -func (s *LatencyInfo) checkPercentiles() { - if s.P99 > s.Max { - s.P99 = s.Max - } - if s.P90 > s.Max { - s.P90 = s.Max - } - if s.P50 > s.Max { - s.P50 = s.Max - } } diff --git a/pkg/ui/workspaces/cluster-ui/src/statsTableUtil/statsTableUtil.tsx b/pkg/ui/workspaces/cluster-ui/src/statsTableUtil/statsTableUtil.tsx index 23fb87d19044..08f099a6f4c7 100644 --- a/pkg/ui/workspaces/cluster-ui/src/statsTableUtil/statsTableUtil.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/statsTableUtil/statsTableUtil.tsx @@ -964,6 +964,14 @@ export const statisticsTableTitles: StatisticTableTitleType = {

The 50th latency percentile for sampled {contentModifier} executions with this fingerprint. +
+
+ Warning: the data source for latency percentiles is + different from the source for other execution statistics. These + percentiles are not calculated from the same set of executions as + the other columns and can be inconsistent. The data is provided for + informational purposes here and is not expected to be consistent + with max, min, or average latency that is also presented.

} > @@ -990,6 +998,14 @@ export const statisticsTableTitles: StatisticTableTitleType = {

The 90th latency percentile for sampled {contentModifier} executions with this fingerprint. +
+
+ Warning: the data source for latency percentiles is + different from the source for other execution statistics. These + percentiles are not calculated from the same set of executions as + the other columns and can be inconsistent. The data is provided for + informational purposes here and is not expected to be consistent + with max, min, or average latency that is also presented.

} > @@ -1016,6 +1032,14 @@ export const statisticsTableTitles: StatisticTableTitleType = {

The 99th latency percentile for sampled {contentModifier} executions with this fingerprint. +
+
+ Warning: the data source for latency percentiles is + different from the source for other execution statistics. These + percentiles are not calculated from the same set of executions as + the other columns and can be inconsistent. The data is provided for + informational purposes here and is not expected to be consistent + with max, min, or average latency that is also presented.

} >