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

Long Execution Time of Flux Queries in Grafana with InfluxDB 2 #88015

Open
chamikarak opened this issue May 17, 2024 · 0 comments
Open

Long Execution Time of Flux Queries in Grafana with InfluxDB 2 #88015

chamikarak opened this issue May 17, 2024 · 0 comments

Comments

@chamikarak
Copy link

What happened?

When running Flux queries from Grafana to fetch data from InfluxDB 2, the query execution time exceeds 5 minutes. Even after optimizing the queries by removing regex parts from variable definitions and adding the duration parameter to the aggregateWindow function, the execution time remains high, with the best time achieved being 2 minutes.

What did you expect to happen?

I expected the Flux queries to execute within a reasonable time frame, ideally under 1 minute, considering the size and complexity of the data being queried.

Did this work before?

No, the queries have consistently taken a long time to execute, even before attempting the optimizations mentioned above.

How do we reproduce it?

1Use Grafana to run Flux queries against an InfluxDB 2 database.
Construct queries that involve fetching data over a significant time range or from large datasets.
Observe that the queries take longer than expected to execute, often exceeding 5 minutes.
Attempt optimizations such as removing regex parts from variable definitions and adding the duration parameter to the aggregateWindow function, but notice minimal improvements in query execution time.

Is the bug inside a dashboard panel?

Yes.

Environment (with versions)?

Grafana: 9.3.6
OS: windows
Browser: Chrome

Grafana platform?

Kubernetes

Datasource(s)?

InfluxDB2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant