influxdata / influxdata/docs-v2

make reference to tail function

Open
#4,590 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
82
Forks
326
Avg merge
1d 1h
Merged PRs (30d)
82

Description

As an alternative to the sort and limit function, tail function should be mentioned here also.
typical query where tail function without sort is way more performant:
“get latest xx values within a timerange”
using
|> tail(n: 10000)
is much faster then the suggested solution in the current doc.
|> sort(columns: ["_time"], desc: **true**)
|> limit(n: 10000)

##### Relevant URLs
- https://docs.influxdata.com/influxdb/v2.4/query-data/flux/sort-limit/
- salesforce support case: #00107489 - poor performance on certain queries [ ref:_00D37JQwH._5001S1YiY5U:ref ]

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading the sort-limit documentation at the relevant URL and compare its suggested sort and limit query with the issue's tail example. Done means the page mentions tail as an alternative for retrieving the latest values within a time range and includes the supplied query context.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.