# Improve request-time from InfluxDB

**URL:** <https://community.grafana.com/t/improve-request-time-from-influxdb/64955>\
**Category:** InfluxDB\
**Tags:** grafana-ui, influxdb\
**Created:** [May 1, 2022, 11:46am UTC](https://community.grafana.com/t/improve-request-time-from-influxdb/64955 "2022-05-01T11:46:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nunu00511](https://avatars.discourse-cdn.com/v4/letter/n/7cd45c/32.png) [@nunu00511](https://community.grafana.com/u/nunu00511)\
**Post date:** [May 1, 2022, 11:46am UTC](https://community.grafana.com/t/improve-request-time-from-influxdb/64955/1 "2022-05-01T11:46:24Z")

</div>

- What Grafana version and what operating system are you using?  
OS: Windows 10  
Docker version 20.10.5  
Docker-Container: Grafana v7.5.5  
Docker-Container: InfluxDB Version 2.0.5

- **What** are you trying to achieve?

Improve the response-time from influxDB.

Insidea Granfa-Dashboard are 24 Graph-Panels.

With a refresh-rate of 500ms,1s,2s should the Graph-Panels be updated fast

- **How** are you trying to achieve it?

I measured the time with Google Chrome and see some query states are “cancel”, “pending” or response time takes to 500 ms.  
Grafana and InfluxDB running on the same server.

I tested this with 500ms refresh-rate and 1h time-range:

 ![image](https://us1.discourse-cdn.com/grafana/original/3X/6/3/63c19ea318369cd75a35bc688ae105869cbbad12.png)

- What happened?

Some Graph-Panels takes too much time to show the values.

- What did you **expect** to happen?

To avoid long waiting and improve the usability of the Dashboards

- Can you copy/paste the configuration(s) that you are having problems with?  
–

- Did you receive any errors in the Grafana UI or in related logs? If so, please tell us **exactly** what they were.  
–

- Did you follow any online instructions? If so, what is the URL?  
–

Thx in advance

---

<div class="post-metadata">

**Author:** ![anon70503803](https://avatars.discourse-cdn.com/v4/letter/a/8797f3/32.png) [@anon70503803](https://community.grafana.com/u/anon70503803)\
**Post date:** [June 6, 2022, 8:00am UTC](https://community.grafana.com/t/improve-request-time-from-influxdb/64955/2 "2022-06-06T08:00:12Z")

</div>

you need to share your query for real help. But if I had to guess I’d say you are requesting way too many data points and that is slowing things down. You can also use things like library panels or the special `Dashboard` datasourece to reuse queries. This can also improve response time.

---

<div class="post-metadata">

**Author:** ![grant2](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/grant2/32/42281_2.png) [@grant2](https://community.grafana.com/u/grant2)\
**Post date:** [June 6, 2022, 9:17am UTC](https://community.grafana.com/t/improve-request-time-from-influxdb/64955/3 "2022-06-06T09:17:50Z")

</div>

In addition to what @anon70503803 said, I found [this webinar from Influxdb about Schema Design for IoT](https://www.youtube.com/watch?v=d99oCnOyA4k) to be extremely helpful. When we migrated from InfluxQL to Flux, I spent time thinking about the 50+ queries we would eventually make, and came up with new field names & tag names that made sense to use in our data structure. As a result, the Flux queries (vs. InfluxQL, where we did not use tags) made our queries much, much faster.

---

<div class="post-metadata">

**Author:** ![yosiasz](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/yosiasz/32/45847_2.png) [@yosiasz](https://community.grafana.com/u/yosiasz)\
**Post date:** [June 6, 2022, 3:54pm UTC](https://community.grafana.com/t/improve-request-time-from-influxdb/64955/4 "2022-06-06T15:54:04Z")

</div>

the following is critical to understand for performance issues

InfluxDB lets you specify fields and tags, both being key/value pairs where the difference is that tags are automatically indexed.

Because fields are not being indexed at all, on every query where InfluxDB is asked to find a specified field, it needs to sequentially scan every value of the field column.

from

[InfluxDB design guidelines to avoid performance issues – Service Engineering (ICCLab & SPLab)](https://blog.zhaw.ch/icclab/influxdb-design-guidelines-to-avoid-performance-issues/#:~:text=InfluxDB%20lets%20you%20specify%20fields,value%20of%20the%20field%20column).
