Live View 视图简介

  • 类似时间监听器
  • 需设置 allow_experimental_live_view 为 1,检查
    1
    
    SELECT name, value FROM system.settings WHERE name LIKE '%live_view%';
    

创建 Live View 视图

  • 创建

    1
    
    CREATE LIVE VIEW lv_name AS SELECT count(*) FROM table_name;
    
  • 监听

    1
    
    WATCH lv_name