Syntax
Arguments
db_name- The name of the database where a TimeSeries table is located.time_series_table- The name of a TimeSeries table.instant_query- An instant selector written in PromQL syntax, without@oroffsetmodifiers.min_time- Start timestamp, inclusive.max_time- End timestamp, inclusive.return_columns- The columns returning the samples:'samples'or'timestamp_and_value', see below.
min_time and max_time can have fractions of a second even if the timestamps in the table are whole seconds:
the function selects the samples with min_time <= timestamp <= max_time exactly, without rounding the bounds to the type of the timestamps.
Returned value
The function returns the columnid with the identifiers of the time series matching the specified selector, and the samples
in the columns chosen by the argument return_columns:
'samples'- the columnsampleswith the samples of a time series as an array of tuples(timestamp, value)sorted by timestamp. The samples of a time series can be returned in multiple rows, for example one row per time bucket of the samples table. Use the aggregate functiontimeSeriesGroupArrayto merge the rows of a time series.'timestamp_and_value'- the columnstimestampandvaluewith one sample per row.
TimeSeries table of version 11 or later stores buckets of samples as arrays, the tables of earlier versions store one sample per row.
The samples are converted when the requested columns differ from the layout of the table, which costs some time; the PromQL functions
request the columns matching the layout of the table.
There is no specific order for returned data.