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

相关推荐
liao__ran3 天前
ClickHouse CPU 排查快速参考指南
运维·服务器·clickhouse
XueminXu3 天前
ClickHouse查看数据库、表、列等元数据信息
clickhouse·system·元数据·databases·system.tables·system.columns·system.settings
liao__ran3 天前
ClickHouse CPU 排查详细指南
运维·clickhouse
现在,此刻5 天前
高可用与高性能数据库配置实践分析(pgSql && clickhouse)
数据库·clickhouse
yourkin6665 天前
clickhouse
clickhouse
努力成为一个程序猿.5 天前
Clickhouse数据副本和分片
运维·clickhouse·debian
l1t5 天前
改写ITPUB newkid的求解数独DuckDB SQL为Clickhouse格式
数据库·sql·clickhouse·duckdb
现在,此刻8 天前
clickhouse和pgSql跨库查询方案对比
数据库·sql·clickhouse·性能优化
擎创夏洛克AIOps8 天前
数据存储新势力:Doris如何挑战ClickHouse的霸主地位?
clickhouse
XueminXu14 天前
ClickHouse数据库的表引擎
数据库·clickhouse·log·表引擎·mergetree·special·integrations