A continuous aggregate stores a precomputed query result in a hypertable and refreshes it incrementally. It suits analytical queries over large historical datasets or data queried more often than it changes. section 9.6 section 9.6.1
Detecting low heart rate
For smartwatch monitoring, aggregate measurements into five-minute buckets per watch. Store the minimum rate, readings below 50 BPM, and total measurements; then treat low_rate_count >= 5 as a detected event. Querying three consecutive buckets returns three positive results.
New measurements do not automatically update the aggregate. Define a policy with start_offset, end_offset, and schedule_interval, or refresh a precise time range manually when working with fixed historical timestamps. section 9.6.2
