all-things-risingwave

What are the ways to configure retention policy of a table in RisingWave?

I'm preparing for a talk about streaming databases and would like to know if RisingWave supports setting a retention time for tables or materialized views to automatically delete older rows. Is there a feature like this in RisingWave, or is there another way to manage memory usage?

Jo

Joe Lin

Asked on Mar 25, 2024

  • RisingWave previously allowed users to define a TTL (time-to-live) for tables or materialized views using the retention_seconds option in the CREATE TABLE/MATERIALIZED VIEW statement.
  • This approach has been replaced with using temporal filters in SQL queries to control data retention.
  • For example, you can create a materialized view with a temporal filter to only keep data from the last week.
  • The retention logic is now part of the computation rather than a hard time limit on the materialized view.
  • RisingWave stores data on S3 and fetches data into local memory only when needed, avoiding memory occupation by old data.
  • Data ingestion in RisingWave offers create table for storing ingested data and create source for building materialized views without storing data.
  • Plain views (create view) are logical constructs that do not store data but can simplify SQL queries.
Mar 25, 2024Edited by