mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-15 08:23:34 +01:00
lib/storage: tune the returned value from adjustMaxMetricsAdaptive
This commit is contained in:
parent
386c349c8c
commit
23e078261e
@ -1316,10 +1316,10 @@ func (is *indexSearch) adjustMaxMetricsAdaptive(tr TimeRange, maxMetrics int) in
|
||||
return maxMetrics
|
||||
}
|
||||
hourMetrics := hmPrev.m.Len()
|
||||
if hourMetrics >= 256 && maxMetrics > hourMetrics/4 {
|
||||
if maxMetrics > hourMetrics {
|
||||
// It is cheaper to filter on the hour or day metrics if the minimum
|
||||
// number of matching metrics across tfs exceeds hourMetrics / 4.
|
||||
return hourMetrics / 4
|
||||
// number of matching metrics across tfs exceeds hourMetrics.
|
||||
return hourMetrics
|
||||
}
|
||||
return maxMetrics
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user