当前位置:网站首页>数据仓库—什么是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
边栏推荐
- 100 GIS practical application cases (52) - how to keep the number of rows and columns consistent and aligned when cutting grids with grids in ArcGIS?
- Summary of JVM knowledge points - continuously updated
- ECDSA signature verification principle and C language implementation
- Importerror after tensorflow installation: DLL load failed: the specified module cannot be found, and the domestic installation is slow
- Three channel ultrasonic ranging system based on 51 single chip microcomputer (timer ranging)
- 100 GIS practical application cases (53) - making three-dimensional image map as the base map of urban spatial pattern analysis
- MySQL basic statement query
- The accuracy and speed are perfectly balanced, and the latest image segmentation SOTA model is released!!!
- hbuilderx + uniapp 打包ipa提交App store踩坑记
- Hanlp word splitter (via spark)
猜你喜欢
MySQL —— 16、索引的数据结构
LeetCode_DFS_中等_695.岛屿的最大面积
[51 single chip microcomputer traffic light simulation]
Melt reshape decast long data short data length conversion data cleaning row column conversion
AUTOSAR from introduction to mastery 100 lectures (52) - diagnosis and communication management function unit
Read the data in Presto through sparksql and save it to Clickhouse
Date time type in database
Complete project data of UAV apriltag dynamic tracking landing based on openmv (LabVIEW + openmv + apriltag + punctual atom four axes)
Learning notes of AMBA protocol
1130 - host XXX is not allowed to connect to this MySQL server error in Navicat remote connection database
随机推荐
Introduction to servlet listener & filter
Use Proteus to simulate STM32 ultrasonic srf04 ranging! Code+Proteus
Async void provoque l'écrasement du programme
STD:: shared of smart pointer_ ptr、std::unique_ ptr
R语言中dcast 和 melt的使用 简单易懂
Custom nail robot alarm
[untitled] make a 0-99 counter, P1 7 connected to key, P2 connected to nixie tube section, common anode nixie tube, P3 0,P3. 1. Connect the nixie tube bit code. Each time you press the key, the nixie
MySQL 8.0.11下载、安装和使用可视化工具连接教程
nodeJs + websocket 循环小案例
Important knowledge of transport layer (interview, retest, final)
mui 微信支付 排坑
The accuracy and speed are perfectly balanced, and the latest image segmentation SOTA model is released!!!
Melt reshape decast long data short data length conversion data cleaning row column conversion
The first lesson is canvas, showing a small case
Pyqt5 store opencv pictures into the built-in sqllite database and query
MySQL -- 16. Data structure of index
MySQL5.5安装教程
mui 关闭其他页面,只保留首页面
[Technical Specification]: how to write technical documents?
Design and manufacture of 51 single chip microcomputer solar charging treasure with low voltage alarm (complete code data)