HomeMogDBMogDB StackUqbar

Documentation:v2.0

Supported Versions:

Other Versions:

ALTER CONTINUOUS AGGREGATION

Function

Modifies a persistent aggregation that already exists in the current database.

Syntax Format

ALTER CONTINUOUS AGGREGATION [IF EXISTS] conagg_name action

where action is:

ALTER EVERY TO new_resample_interval
| ALTER START_OFFSET TO new_start_offset
| ALTER END_OFFSET TO new_end_offset

Parameter Description

  • conagg_name

    The name of the continuous aggregation that needs to be modified, which may include a schema section.

    imgNote: Specifying tablespace sections is not supported.

  • new_resample_interval

    A new resampling interval for continuous aggregation.

    imgNote: Modifying the resampling interval will take the current time + the new resampling interval and align it forward with the new resampling interval time unit as the next start time of the background task.

    If the new resampling interval is '0s', the next start time of the continuous aggregation background task will be updated to 'infinity' (maximum value of timestamp type, which represents the pause start of the background task). And use the continuous aggregation original resample_time - original continuous aggregation resample interval + new continuous aggregation sample interval as the new resample_time for continuous aggregation.

  • new_start_offset

    Continuously aggregates new sampling windows to start offsets.

  • new_end_offset

    Continuously aggregates new sampling windows to end offsets.

    imgNote: Only one parameter can be modified at a time, and the new parameter value must satisfy the constraints that were in place when the persistent aggregation was created.

Examples

Uqbar=# ALTER CONTINUOUS aggregation IF EXISTS weather_ca ALTER EVERY
TO '1 hour';
ALTER CONTINUOUS AGGREGATION

CREATE CONTINUOUS AGGREGATION, DROP CONTINUOUS AGGREGATION

Copyright © 2011-2024 www.enmotech.com All rights reserved.