跳转至主要内容

改变流

Currently we don't recommend to alter the schema of streams in Timeplus. You can modify the retention policy for historical store via MODIFY TTL and modify the retention policy for streaming storage via MODIFY SETTING.

You can also use ALTER STREAM to modify the settings of materialized views (only available in Timeplus Enterprise).

MODIFY TTL

You can add or modify the retention policy. 例如 例如

ALTER STREAM stream_name MODIFY TTL
to_datetime(created_at) + INTERVAL 48 HOUR

MODIFY SETTING

You can add or modify the retention policy for streaming storage. 例如

ALTER STREAM stream_name MODIFY SETTING
logstore_retention_ms = ...,
logstore_retention_size = ...;

MODIFY QUERY SETTING

注意

This feature is available in Timeplus Enterprise v2.2.8 or above. Not available in Timeplus Proton.

By default, the checkpoint will be updated every 15 minutes for materialized views. You can change the checkpoint interval without recreating the materialized views.

ALTER STREAM mv_with_inner_stream MODIFY QUERY SETTING checkpoint_interval=600

RESET QUERY SETTING

注意

This feature is available in Timeplus Enterprise v2.2.8 or above. Not available in Timeplus Proton.

By default, the checkpoint will be updated every 15 minutes for materialized views. After you change the interval you can reset it.

ALTER STREAM mv_with_inner_stream RESET QUERY SETTING checkpoint_interval

See also

CREATE STREAM - Create streams CREATE MATERIALIZED VIEW - Create materialized views DROP STREAM - Drop streams DROP VIEW - Drop materialized views