ALTER MATERIALIZED VIEW (Continuous Aggregate)
CommunityCommunity functions are available under Timescale Community Edition. Click to learn more.ALTER MATERIALIZED VIEW
statement can be used to modify some of the WITH
clause options for the continuous aggregate view.
ALTER MATERIALIZED VIEW
statement also supports the following
PostgreSQL clauses on the
continuous aggregate view:
RENAME TO
clause to rename the continuous aggregate viewRENAME [COLUMN]
clause to rename the continuous aggregate columnSET SCHEMA
clause to set the new schema for the continuous aggregate viewSET TABLESPACE
clause to move the materialization of the continuous aggregate view to the new tablespaceOWNER TO
clause to set new owner for the continuous aggregate view
ALTER MATERIALIZED VIEW <view_name> SET ( timescaledb.<option> = <value> [, ... ] )
Name | Type | Description |
---|---|---|
<view_name> | TEXT | Name (optionally schema-qualified) of continuous aggregate view to be created. |
Name | Description |
---|---|
timescaledb.materialized_only | Enable and disable real time aggregation |
timescaledb.compress | Enable and disable compression |
timescaledb.compress_orderby | TEXT |
timescaledb.compress_segmentby | TEXT |
timescaledb.compress_chunk_time_interval | TEXT |
To disable real-time aggregates for a continuous aggregate:
ALTER MATERIALIZED VIEW contagg_view SET (timescaledb.materialized_only);
To enable compression for a continuous aggregate:
ALTER MATERIALIZED VIEW contagg_view SET (timescaledb.compress);
To rename a column for a continuous aggregate:
ALTER MATERIALIZED VIEW contagg_view RENAME COLUMN old_name TO new_name;
The only options that currently can be modified with ALTER
MATERIALIZED VIEW
are materialized_only
and compress
. The other options
continuous
and create_group_indexes
can only be set when creating
the continuous aggregate.
Keywords
Found an issue on this page?Report an issue or Edit this page in GitHub.