influxdata / influxdata/influxdb

Flux queries of influxdb tags (keys(), tag groups) should allow push-downs of filters including _field in the predicate

Open
#21,171 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1.x
Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

__Proposal:__
Flux queries corresponding to influxql meta-queries (`show tag keys`, `show tag values`) should support filtering by `_field` (the field name) efficiently. There is a performance improvement for these filters implemented in 2.x OSS that we would like to be back ported to 1.x.

See the tests proposed in https://github.com/influxdata/influxdb/pull/21160/files for how this feature would look.

Note the implementation in that PR would need to change somewhat to be compatible with InfluxDB Enterprise. Ideally the influxql backend could be shared by both flux and influxql - this would require improvements to the influxql metaquery backend.

__Current behavior:__
Flux queries over influxdb tag keys and values that otherwise could be pushed down to the storage engine and made more efficient will instead use less-efficient strategies when the filter() contains `_field`.

__Desired behavior:__
We would like these queries to be maximally efficient

__Alternatives considered:__
N/A.

__Use case:__
Filtering tag keys and values by which field keys they show up with.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the tests proposed in the linked pull request and trace the Flux queries over tag keys and values that include _field in filter(). Confirm how the InfluxQL meta-query backend handles these queries and what Enterprise compatibility requires; done means the filters are pushed down efficiently for both Flux and InfluxQL-compatible paths.

Written by the indexing model from the issue text.

Assessment

Domain
backend, databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.