2021-11-14 15:52:46 +08:00

28 lines
792 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: "ClickHouse 表引擎之 Join"
date: 2020-10-08T17:40:00+08:00
lastmod: 2020-10-08T17:40:00+08:00
tags: []
categories: ["clickhouse"]
---
## Join 表引擎简介
- 数据先写内存,再同步到磁盘,服务重启后全量加载到内存
- 与 Set 表引擎共用大部分处理逻辑
- 简单封装了一层 JOIN 查询,主要用做 JOIN 查询
## 创建 Join 引擎表
- 声明
```sql
ENGINE = Join(join_strictness, join_type, key1[, key2, ...])
```
- join_strictness: 连接精度,支持 ALL、ANY 和 ASOF
- join_type: 连接类型,支持 INNRE、OUTER、CROSS
- key1, key2 ...: 连接键,关联字段
- 如果连接精度是 ANY写入数据时会忽略连接键相同的数据
## 参考
- [ClickHouse 表引擎之 Join](/post/ch-search/#JOIN)