influxdata / influxdata/influxdb

SLIMIT Order by Tag

Open
#10,495 11 comments 6 reactions 0 assignees View on GitHub
1.x
Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

__System info:__
InfluxDB v1.7

__Steps to reproduce:__
I have a database full of traffic data, in and out by host. All working fine, but I want to plot / select only the top N traffic users. SLIMIT should do this, but I need to be able to order the items by traffic (summation), before SLIMIT is applied. It doesn't seem that this is possible? For example,
`SELECT mean("value") FROM "rp2h"."rate" WHERE time > now()-2h GROUP BY time(1s), "host", "direction" LIMIT 5 SLIMIT 3`
=> I need to be able to order the data for SLIMIT, is there a way to do this?

Thanks!

Contributor guide

Open the contributing guide

Research direction

The issue mentions no file, test, or entry point. Start by reproducing the InfluxDB v1.7 query and determine whether grouped results can be ordered by their aggregate before SLIMIT; done means the requested top-N ordering behavior is defined and verified.

Written by the indexing model from the issue text.

Assessment

Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.