mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-15 08:23:34 +01:00
sort orSuffixes in tagFilter.InitFromGraphiteQuery for faster seeks
This commit is contained in:
parent
785b770af3
commit
45a63a1da9
@ -264,6 +264,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 New Issue
Block a user