mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
app/vmselect/promql: clarify comments on why the right side of if
and and
operators are executed at first
This commit is contained in:
parent
10367d7e4c
commit
1173964d8d
1 changed files with 4 additions and 4 deletions
|
@ -302,10 +302,10 @@ func evalExpr(ec *EvalConfig, e metricsql.Expr) ([]*timeseries, error) {
|
|||
var tssLeft, tssRight []*timeseries
|
||||
switch strings.ToLower(be.Op) {
|
||||
case "and", "if":
|
||||
// Fetch right-side series at first, since the left side of `and` and `if` operator
|
||||
// usually contains lower number of time series. This should produce more specific label filters
|
||||
// for the left side of the query. This, in turn, should reduce the time to select series
|
||||
// for the left side of the query.
|
||||
// Fetch right-side series at first, since it usually contains
|
||||
// lower number of time series for `and` and `if` operator.
|
||||
// This should produce more specific label filters for the left side of the query.
|
||||
// This, in turn, should reduce the time to select series for the left side of the query.
|
||||
tssRight, tssLeft, err = execBinaryOpArgs(ec, be.Right, be.Left, be)
|
||||
default:
|
||||
tssLeft, tssRight, err = execBinaryOpArgs(ec, be.Left, be.Right, be)
|
||||
|
|
Loading…
Reference in a new issue