This commit is contained in:
2021-11-14 15:52:46 +08:00
parent 915c231124
commit 1e344dc204
112 changed files with 1039 additions and 1039 deletions

View File

@@ -6,17 +6,17 @@ tags: []
categories: ["clickhouse"]
---
# 简介
## 简介
- 常驻内存,支持动态更新
- 适合保存常量和经常使用的维度表数据
- 可通过字典函数访问,也可通过袋里表与其他数据表实现 JOIN 查询
# 内置字典
## 内置字典
- 默认禁用
- 不想写了,没啥意思
# 外部扩展字典
## 配置文件
## 外部扩展字典
### 配置文件
- 位置: /etc/clickhouse-server/\*\_dictionary.xml
- 自动感知变更,不停机在线更新
- 系统表: system.dictionaries
@@ -201,7 +201,7 @@ categories: ["clickhouse"]
</dictionaries>
```
## 操作
### 操作
- 手动更新全部数据字典
```sql
SYSTEM RELOAD DICTIONARIES;
@@ -239,7 +239,7 @@ categories: ["clickhouse"]
LIFETIME(1);
```
# Dictionary 表引擎
## Dictionary 表引擎
- 创建字典表
```sql
CREATE TABLE table_name(