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用单独的线程去处理,处理快的线程可以处理慢线程的任务

相关推荐
言之。4 天前
简单介绍一下Clickhouse及其引擎
clickhouse
西京刀客4 天前
clickhouse的UInt64类型(countIf() 函数返回)
clickhouse·uint64·countif
Super_King_5 天前
ClickHouse 中 ORDER BY 场景下 arrayExists 与 hasAny 性能深入研究:布隆过滤器索引的影响分析
clickhouse
Super_King_5 天前
深入研究:ClickHouse中arrayExists与hasAny在ORDER BY场景下的性能差异
clickhouse
-KamMinG5 天前
阿里云ClickHouse数据保护秘籍:本地备份与恢复详解
clickhouse·阿里云·云计算
问道飞鱼5 天前
【大数据相关】ClickHouse命令行与SQL语法详解
大数据·sql·clickhouse
MMMMMMMMMMemory10 天前
clickhouse迁移工具clickhouse-copier
clickhouse
securitor10 天前
【clickhouse】设置密码
clickhouse
天道有情战天下13 天前
ClickHouse使用Docker部署
clickhouse·docker·容器