This commit is contained in:
2021-11-14 14:32:08 +08:00
parent f75ad8bedd
commit b0f6120151
152 changed files with 22219 additions and 8 deletions

View File

@@ -0,0 +1,26 @@
---
title: "ClickHouse 视图之 Live View"
date: 2020-10-08T19:05:00+08:00
lastmod: 2020-10-08T19:05:00+08:00
tags: []
categories: ["clickhouse"]
---
# Live View 视图简介
- 类似时间监听器
- 需设置 allow_experimental_live_view 为 1检查
```sql
SELECT name, value FROM system.settings WHERE name LIKE '%live_view%';
```
# 创建 Live View 视图
- 创建
```sql
CREATE LIVE VIEW lv_name AS SELECT count(*) FROM table_name;
```
- 监听
```sql
WATCH lv_name
```