Down Sampling (Continuous Query)
Continuous Query (CQ):
CREATE CONTINUOUS QUERY cq_cpu_count_3m_respTime ON testdb
RESAMPLE EVERY 3m
SELECT count(responseTime) AS count_rT INTO cpu_count_3m FROM cpu_info GROUP BY time(3m)
Manual Query (MQ):
SELECT count(responseTime) FROM cpu_info where time >= “any time after creation of CQ” GROUP BY time(3m)
simply execute the above query by removing WHERE clause i.e. SELECT count(responseTime) FROM cpu_info GROUP BY time(3m)
MQ Vs CQ:
It turned out to be MQ always greater than CQ (~1.5x to 3x times greater).
I have created a Continuous Query to downsample the data based on “count” aggregation grouped for every 3 minutes interval.
What I noticed is the aggregated count value ingested for every 3 minutes time frame is different from the actual count.
To confirm I executed a query manually by giving required time interval like the ones mentioned above (MQ) and when compared with the value ingested by CQ the value of former is ~1.5x to 3x times more compared to CQ ingestion rate (most of the times it is ~3x times greater).
So am I missing something here or is this the desired behavior or is it a bug.