You've already forked www.colben.cn
update
This commit is contained in:
27
content/post/ch-set.md
Normal file
27
content/post/ch-set.md
Normal file
@@ -0,0 +1,27 @@
|
||||
---
|
||||
title: "ClickHouse 表引擎之 Set"
|
||||
date: 2020-10-08T17:04:00+08:00
|
||||
lastmod: 2020-10-08T17:04:00+08:00
|
||||
tags: []
|
||||
categories: ["clickhouse"]
|
||||
---
|
||||
|
||||
# Set 表引擎简介
|
||||
- 数据先写内存,再同步到磁盘,服务重启后全量加载到内存
|
||||
- 支持 INSERT,写入时,重复数据被忽略
|
||||
- 不能直接 SELECT,只能作为 IN 查询的右侧条件
|
||||
|
||||
# 创建 Set 引擎表
|
||||
- 声明
|
||||
```sql
|
||||
ENGINE = Set()
|
||||
```
|
||||
|
||||
# 使用
|
||||
- 创建 Set 引擎表
|
||||
- INSERT 写入数据
|
||||
- 查询
|
||||
```sql
|
||||
SELECT arrayJoin([1,2,3]) AS a WHERE a IN set_table;
|
||||
```
|
||||
|
Reference in New Issue
Block a user