v.21.2Improvements
Added SUPPORT for WITH ... REFRESH Clause in LIVE VIEW Tables
Added support forWITH ... [AND] [PERIODIC] REFRESH [interval_in_sec]clause when creatingLIVE VIEWtables. #14822 (vzakaznikov).
Why it matters
This feature enables users to specify periodic automatic refresh intervals forLIVE VIEW tables, allowing the views to update their data at defined time intervals. It solves the problem of manually refreshing live views and improves efficiency by automating updates based on the given period.How to use it
When creating aLIVE VIEW, use the WITH ... REFRESH [interval_in_sec] or WITH ... AND REFRESH [interval_in_sec] clause to define the refresh interval in seconds. For example:CREATE LIVE VIEW view_name
WITH REFRESH 10
AS
SELECT ...This sets the live view to refresh its data every 10 seconds automatically.