mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-10 15:14:09 +00:00
sort orSuffixes in tagFilter.InitFromGraphiteQuery for faster seeks
This commit is contained in:
parent
9d41c06db1
commit
6123aa3e75
1 changed files with 3 additions and 0 deletions
|
@ -246,6 +246,9 @@ func (tf *tagFilter) InitFromGraphiteQuery(commonPrefix, query []byte, paths []s
|
|||
if len(orSuffixes) == 0 {
|
||||
orSuffixes = append(orSuffixes, "")
|
||||
}
|
||||
// Sort orSuffixes for faster seek later.
|
||||
sort.Strings(orSuffixes)
|
||||
|
||||
tf.key = append(tf.key[:0], "__graphite__"...)
|
||||
tf.value = append(tf.value[:0], query...)
|
||||
tf.isNegative = isNegative
|
||||
|
|
Loading…
Reference in a new issue