MATERIALIZED VIEW, you set a
policy. This policy defines the intervals when chunks in a
are compressed as they are converted from the to the .
works in the same way on s and s. When you enable
with no other options, your data is segmented by
the groupby columns in the , and ordered by the time column.
Real-time aggregation is disabled by default.
Since 2.20.0. For the old API (pre-2.20.0), see legacy compression documentation.
Configure columnstore on continuous aggregates
For an existing :-
Enable on a
To enable the compression on a , set
timescaledb.enable_columnstore = truewhen you alter the view:To disable the compression, settimescaledb.enable_columnstore = false. -
Set policies on the
Before you set up a policy on a , you first set the refresh policy.
To prevent refresh policies from failing, you set the policy interval so that actively
refreshed regions are not compressed. For example:
-
Set the refresh policy
-
Set the columnstore policy
For this refresh policy, the
afterparameter must be greater than the value ofstart_offsetin the refresh policy:
-
Set the refresh policy