Clickhouse初认识

技术主题-clickhouse

一什么是clickHouse

1)本质上就是一款数据库管理系统,能提供海量数据的存储和检索

2)基于列存储,数据是按照列进行存储的(数据格式一样,方便进行压缩)

3)具备功能(多核并发处理、分布式处理、兼容sql)兼容mysql的sql语法,有sql经验,便于快速上手熟悉

4)基于OLAP,和传统的事物数据库不同,倾向于大数据量的分析

二clickHouse的4个概念

1)granule: a logical breakdown of rows inside an uncompressed block;default is 8192 rows

逻辑的概念,默认是8192行,最小的不可分的数据集

2)primary key:the sort order of a table

表的主键,用来排序的一个键

3)primary index: an in-memory index containing the values of the primary keys of the first row of each granule

稀疏索引,加速查询

4)part: a folder of files consisting of the column files and index file of a subset of a table is data

就是一个目录,目录里面包含列文件和索引文件,批量插入一次创建一个part

三Inserting data into a table

1)创建数据表-primary key

2)每次批量插入创建一个part,官方建议最少1000行,举个例子

3)数据的存储,文件是基于主键的顺序,有索引文件,每个列是一个文件

4)mergetree合并part

5)mergetree合并part,默认最大的part由参数控制

6)primary indexs

5)每一个granule用单独的线程去处理,处理快的线程可以处理慢线程的任务

相关推荐
狼与自由11 小时前
clickhouse建表
clickhouse
简简单单就是我_hehe15 小时前
clickhouse内置函数和关键词总结
clickhouse
狼与自由17 小时前
clickhouse引擎
clickhouse·c#·linq
狼与自由2 天前
安装使用clickhouse
clickhouse
麦兜和小可的舅舅3 天前
ClickHouse 列管理机制解析:从 COW、IColumn 到 CRTP
c++·clickhouse
4t4run11 天前
1、clickhouse 安装
数据库·clickhouse
JackSparrow41412 天前
使用Elasticsearch代替数据库like以加快查询的各种技术方案+实现细节
大数据·clickhouse·elk·elasticsearch·搜索引擎·postgresql·全文检索
梦想与想象-广州大智汇19 天前
MySQL 同步数据到 ClickHouse 方案对比分析
数据库·mysql·clickhouse
Smile_25422041820 天前
clickhouse日志疯涨问题
linux·运维·服务器·clickhouse
计算机魔术师20 天前
【技术硬核 | 存储】ClickHouse 原理与 Langfuse 存储实践:当 LLM Trace 爆炸时,PG 还扛得住吗?
人工智能·clickhouse·工程实践·sbti·职场焦虑