Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Continuous Query is a very useful feature for users to query time series data periodically according to the time interval and time range.

For example, using the continuous query described below, the IoTDB downsamples the CPU load metric, and keeps a single average datapoint per 15 minutes grouped by server region:

CREATE CONTINUOUS QUERY "downsampled_cpu_load"
ON database_name
BEGIN
  SELECT mean(value) as value,
  INTO "downsampled.cpu_load"
  FROM cpu_load
  GROUP BY time(15m), region
END

...