Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option to limit the number of series returned in SelectSeries API #3593

Closed
kolesnikovae opened this issue Sep 26, 2024 · 0 comments · Fixed by #3602
Closed

Add an option to limit the number of series returned in SelectSeries API #3593

kolesnikovae opened this issue Sep 26, 2024 · 0 comments · Fixed by #3602
Assignees
Labels
backend Mostly go code enhancement New feature or request

Comments

@kolesnikovae
Copy link
Collaborator

SelectSeries always returns all time series in a single response. In many cases, only a subset of the series is actually used (for example, in Explore Profiles, we only show the top 10).

As a quick optimization, we could add a parameter that limits the number of series returned, something like:

message Limit {
   int32 top_k_total = 1;
}

Note that the limit should be applied in the query frontend, after all the series have been collected. Later on, we can implement a fully-fledged time-series query engine capable of handling PromQL syntax (or a subset)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Mostly go code enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant