Long latency on query by tag


I have the following influx table:

time | tag_1 , tag_2 | amount(field)

If I execute query like this (WHERE statement on one of the tags only):

SELECT SUM(amount) FROM table WHERE tag_1 = 'id1' and time > X AND time < Y

I get 30 seconds latency. I use influx V1.5.2 on AWS t2 medium and I have about 1 million records.

Could it be related to the fact that I only use one tag to filter? On this query I need only one. on other queries I need both.


When you’re filtering by more than one tag, is the latency decreased?

Yes, But I can’t in this case.