mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-15 00:13:30 +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 {
|
if len(orSuffixes) == 0 {
|
||||||
orSuffixes = append(orSuffixes, "")
|
orSuffixes = append(orSuffixes, "")
|
||||||
}
|
}
|
||||||
|
// Sort orSuffixes for faster seek later.
|
||||||
|
sort.Strings(orSuffixes)
|
||||||
|
|
||||||
tf.key = append(tf.key[:0], "__graphite__"...)
|
tf.key = append(tf.key[:0], "__graphite__"...)
|
||||||
tf.value = append(tf.value[:0], query...)
|
tf.value = append(tf.value[:0], query...)
|
||||||
tf.isNegative = isNegative
|
tf.isNegative = isNegative
|
||||||
|
Loading…
Reference in New Issue
Block a user