当前位置:网站首页>数据仓库—什么是OLAP
数据仓库—什么是OLAP
2022-04-23 13:08:00 【IT_心如止水】
从事数据仓库或者大数据的同学,应该经常会听到OLAP这个词。什么OLAP分析,OLAP引擎等等名词。今天就来聊聊什么是OLAP。
OLAP与OLTP
说起OLAP,就不得不提一下他的好兄弟OLTP,两者经常会被拿来比较。
首先,看一下两者的
定义:
OLAP(On-Line Analytical Processing):联机分析处理,OLAP是数据仓库系统的主要应用,支持复杂的分析操作,侧重决策支持,并且提供直观易懂的查询结果。
OLTP(on-line transaction processing):联机事务处理,传统的关系型数据库的主要应用,主要是基本的、日常的事务处理。
区别:
通俗来讲的话就是:OLTP主要是面向传统的“增删改查”事务系统,数据大都是以实体对象模型来存储数据,并满足3NF(数据库第三范式),追求高并发场景下的快速响应。而OLAP是面向决策分析场景,采用维度建模思想构建模型,追求大规模聚合分析查询的性能表现。
OLAP的分类
一般来说,根据建模方式OLAP可分为3种类型:关系型联机实时分析系统(Relational-OLAP,ROLAP),多维联机实时分析系统(Multidimensional-OLAP,MOLAP),混合型联机实时分析系统(Hybrid-OLAP,HOLAP)。
ROLAP
一种通过在RDMS后端服务和客户前端之间建立中间层的OLAP实现方式。通过RDMS来存储和管理数据仓库数据,而通过OLAP中间件来实现多维数据上的操作映射为标准关系操作。
ROLAP的处理引擎主要有:Presto,Impala,GreenPlum,Clickhouse、Doris。
ROLAP 适用于对查询模式不固定、查询灵活性要求高的场景,但是处理的数据量级受限于引擎性能,对于超大数据量的复杂查询表现不太好
MOLAP
MOLAP一般会根据用户定义的数据维度、度量(也可以叫指标)在数据写入时生成预聚合数据;Query查询到来时,实际上查询的是预聚合的数据而不是原始明细数据,在查询模式相对固定的场景中,这种优化提速很明显。
MOLAP的处理引擎主要有:Druid 和 Kylin
MOLAP 适用于查询场景相对固定并且对查询性能要求非常高的场景,灵活性较差。
HOLAP
HOLAP是 MOLAP 和 ROLAP 的一种融合。当查询聚合性数据的时候,使用MOLAP 技术;当查询明细数据时,使用 ROLAP 技术。
一般商业OLAP引擎是HOLAP架构,以便可以满足不同客户的需求。
OLAP的基本操作
OLAP的多维分析操作包括:钻取(Drill-down)、上卷(Roll-up)、切片(Slice)、切块(Dice)以及旋转(Pivot)
钻取(Drill-down):
在维的不同层次间的变化,从上层降到下一层,或者说是将汇总数据拆分到更细节的数据,比如通过对2010年第二季度的总销售数据进行钻取来查看2010年第二季度4、5、6每个月的消费数据,如上图;当然也可以钻取浙江省来查看杭州市、宁波市、温州市……这些城市的销售数据。
上卷(Roll-up):
钻取的逆操作,即从细粒度数据向高层的聚合,如将江苏省、上海市和浙江省的销售数据进行汇总来查看江浙沪地区的销售数据,如上图。
切片(Slice):
选择维中特定的值进行分析,比如只选择电子产品的销售数据,或者2010年第二季度的数据。
切块(Dice):
选择维中特定区间的数据或者某批特定值进行分析,比如选择2010年第一季度到2010年第二季度的销售数据,或者是电子产品和日用品的销售数据。
旋转(Pivot):
即维的位置的互换,就像是二维表的行列转换,如图中通过旋转实现产品维和地域维的互换。
常见OLAP引擎对比
版权声明
本文为[IT_心如止水]所创,转载请带上原文链接,感谢
https://blog.csdn.net/qq_36893938/article/details/124351944
边栏推荐
- 7_ The cell type scores obtained by addmodule and gene addition method are compared in space
- three.js文字模糊问题
- Custom nail robot alarm
- Three channel ultrasonic ranging system based on 51 single chip microcomputer (timer ranging)
- (1) Openjuterpyrab comparison scheme
- Teach you to quickly develop a werewolf killing wechat applet (with source code)
- 将opencv 图片转换为字节的方式
- Byte warehouse intern interview SQL questions
- Record the problems encountered in using v-print
- mui 微信支付 排坑
猜你喜欢
melt reshape decast 长数据短数据 长短转化 数据清洗 行列转化
8086 of x86 architecture
22. Bracket generation
AUTOSAR from introduction to mastery 100 lectures (81) - FIM of AUTOSAR Foundation
LeetCode_DFS_中等_695.岛屿的最大面积
HQL find the maximum value in a range
Teach you to quickly develop a werewolf killing wechat applet (with source code)
Jupiter notebook installation
MySQL supports IP access
PC starts multiple wechat at one time
随机推荐
V-model binding value in El select, data echo only displays value, not label
Golang implements a five insurance and one gold calculator with web interface
Summary of JVM knowledge points - continuously updated
Hbuilderx + uniapp packaging IPA submission app store stepping on the pit
Golang realizes regular matching: the password contains at least one digit, letter and special character, and the length is 8-16
The quill editor image zooms, multiple rich text boxes are used on one page, and the quill editor upload image address is the server address
The use of dcast and melt in R language is simple and easy to understand
STD:: shared of smart pointer_ ptr、std::unique_ ptr
Golang implements MD5, sha256 and bcrypt encryption
Three channel ultrasonic ranging system based on 51 single chip microcomputer (timer ranging)
mysql8安装
filter()遍历Array异常友好
pyqt5 将opencv图片存入内置SQLlite数据库,并查询
[51 single chip microcomputer traffic light simulation]
Read the data in Presto through sparksql and save it to Clickhouse
Van uploader upload picture implementation process, using native input to upload pictures
nodejs + mysql 实现简单注册功能(小demo)
【动态规划】221. 最大正方形
Learning notes of AMBA protocol
Go language: passing slices between functions