Hello everyone,
I’m trying to improve my query performance, which has slowed down significantly over the last year as we put more data into our Influx 1.8.9 server. We need to keep all data forever, so the dataset continues to grow, but we always time-bound our queries.
We have a few databases, each with different measurements, but let me give just one example schema to describe the issue.
measurement: myData
tagset: host, sensor
fieldset: value::float
There is 1 host, 34 sensors, and about 4M values/sensor/day. This simple query spans a 24h window and takes about 30s to execute! The execution time scales linearly with the time window.
SELECT count("value")
FROM "myRP"."myData"
WHERE time >= 1655119521000ms and time <= 1655205921000ms
GROUP BY "sensor" fill(none);
Watching the server resources during the query, I can clearly see the query is stuck using 100% of one CPU while leaving all others idle. Memory and disk IO have plenty of headroom.
Why won’t this query utilize all cores available on the machine?
Are my query or schema badly formed?
Is this single-threaded limitation explicitly fixed by moving from 1.8 to the 2.0 platform?
Thanks in advance for any suggestions or insight.
- Dan