From 27fcdf60bd92ebcaac58186c2039e7342158408e Mon Sep 17 00:00:00 2001 From: atovpeko Date: Fri, 4 Apr 2025 13:20:54 +0300 Subject: [PATCH 1/4] update --- .../continuous-aggregates/refresh-policies.md | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/use-timescale/continuous-aggregates/refresh-policies.md b/use-timescale/continuous-aggregates/refresh-policies.md index f29d213490..3c600de548 100644 --- a/use-timescale/continuous-aggregates/refresh-policies.md +++ b/use-timescale/continuous-aggregates/refresh-policies.md @@ -31,15 +31,7 @@ Among others, `add_continuous_aggregate_policy` takes the following arguments: 24 hours. If you set the `start_offset` or `end_offset` to `NULL`, the range is open-ended -and extends to the beginning or end of time. However, it's recommended to set -the `end_offset` so that at least the most recent time bucket is excluded. For -time-series data that mostly contains writes that occur in time stamp order, the -time buckets that see lots of writes quickly have out-of-date aggregates. You -get better performance by excluding the time buckets that are getting a lot of -writes. - -In addition, materializing the most recent bucket might interfere with -[real-time aggregation][future-watermark]. +and extends to the beginning or end of time. If you set `end_offset` within the current time bucket, and [real-time aggregation][future-watermark] is disabled, the current time bucket is excluded. This is to improve performance: for time-series data that mostly contains writes that occur in the time stamp order, the time buckets that see lots of writes quickly have out-of-date aggregates. You get better performance by excluding the time buckets that are getting a lot of writes. See the [API reference][api-reference] for the full list of required and optional arguments and use examples. From b5d136e806b88ed4e54cfab163c5582d3cb05be2 Mon Sep 17 00:00:00 2001 From: atovpeko Date: Fri, 11 Apr 2025 11:32:30 +0300 Subject: [PATCH 2/4] updates on review --- use-timescale/continuous-aggregates/refresh-policies.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/use-timescale/continuous-aggregates/refresh-policies.md b/use-timescale/continuous-aggregates/refresh-policies.md index 3c600de548..778cceff78 100644 --- a/use-timescale/continuous-aggregates/refresh-policies.md +++ b/use-timescale/continuous-aggregates/refresh-policies.md @@ -31,7 +31,7 @@ Among others, `add_continuous_aggregate_policy` takes the following arguments: 24 hours. If you set the `start_offset` or `end_offset` to `NULL`, the range is open-ended -and extends to the beginning or end of time. If you set `end_offset` within the current time bucket, and [real-time aggregation][future-watermark] is disabled, the current time bucket is excluded. This is to improve performance: for time-series data that mostly contains writes that occur in the time stamp order, the time buckets that see lots of writes quickly have out-of-date aggregates. You get better performance by excluding the time buckets that are getting a lot of writes. +and extends to the beginning or end of time. If you set `end_offset` within the current time bucket, and [real-time aggregation][future-watermark] is disabled, the current time bucket is excluded. This is because the current bucket is incomplete and can't be refreshed. Excluding the current bucket also improves performance: for time-series data that mostly contains writes that occur in the time stamp order, the time buckets that see lots of writes quickly have out-of-date aggregates. You get better performance by excluding the time buckets that are getting a lot of writes. See the [API reference][api-reference] for the full list of required and optional arguments and use examples. From 5aa83370541d5486ace3b845aeadda08e195cdbc Mon Sep 17 00:00:00 2001 From: atovpeko Date: Tue, 15 Apr 2025 10:49:51 +0300 Subject: [PATCH 3/4] change the wording to make it clearer --- .../continuous-aggregates/refresh-policies.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/use-timescale/continuous-aggregates/refresh-policies.md b/use-timescale/continuous-aggregates/refresh-policies.md index 778cceff78..96fc31609c 100644 --- a/use-timescale/continuous-aggregates/refresh-policies.md +++ b/use-timescale/continuous-aggregates/refresh-policies.md @@ -31,10 +31,16 @@ Among others, `add_continuous_aggregate_policy` takes the following arguments: 24 hours. If you set the `start_offset` or `end_offset` to `NULL`, the range is open-ended -and extends to the beginning or end of time. If you set `end_offset` within the current time bucket, and [real-time aggregation][future-watermark] is disabled, the current time bucket is excluded. This is because the current bucket is incomplete and can't be refreshed. Excluding the current bucket also improves performance: for time-series data that mostly contains writes that occur in the time stamp order, the time buckets that see lots of writes quickly have out-of-date aggregates. You get better performance by excluding the time buckets that are getting a lot of writes. +and extends to the beginning or end of time. -See the [API reference][api-reference] -for the full list of required and optional arguments and use examples. +If you set `end_offset` within the current time bucket, this bucket is excluded. This is done for two reasons: + +- The current bucket is incomplete and can't be refreshed. +- The current bucket gets lots of writes in the time-stamp order and its aggregate becomes outdated very quickly. Excluding it improves performance. + +To include the current time bucket, enable [real-time aggregation][future-watermark]. In Timescale 2.13 and later, it is disabled by default. + +See the [API reference][api-reference] for the full list of required and optional arguments and use examples. From 3f02715e1cb7dce427ce7f0c5a6e500cd2c68562 Mon Sep 17 00:00:00 2001 From: Anastasiia Tovpeko <114177030+atovpeko@users.noreply.github.com> Date: Tue, 15 Apr 2025 10:59:21 +0300 Subject: [PATCH 4/4] Update use-timescale/continuous-aggregates/refresh-policies.md Co-authored-by: Iain Cox Signed-off-by: Anastasiia Tovpeko <114177030+atovpeko@users.noreply.github.com> --- use-timescale/continuous-aggregates/refresh-policies.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/use-timescale/continuous-aggregates/refresh-policies.md b/use-timescale/continuous-aggregates/refresh-policies.md index 96fc31609c..b9be7e2a2e 100644 --- a/use-timescale/continuous-aggregates/refresh-policies.md +++ b/use-timescale/continuous-aggregates/refresh-policies.md @@ -33,7 +33,7 @@ Among others, `add_continuous_aggregate_policy` takes the following arguments: If you set the `start_offset` or `end_offset` to `NULL`, the range is open-ended and extends to the beginning or end of time. -If you set `end_offset` within the current time bucket, this bucket is excluded. This is done for two reasons: +If you set `end_offset` within the current time bucket, this bucket is excluded. This is done for the following reasons: - The current bucket is incomplete and can't be refreshed. - The current bucket gets lots of writes in the time-stamp order and its aggregate becomes outdated very quickly. Excluding it improves performance.