1 / 44

列式数据库 + CEP = 完美分析系统

列式数据库 + CEP = 完美分析系统. 卢东明 技术总监, Sybase China. 议题. Sybase 列式数据库及其新发展 新解决方案 Sybase CEP 和 RAP. Sybase 的过去 10 年股票表现. 传统行式数据库. 内存数据库. 列式数据库. 更大量数据的分析. 更多事务处理. OLTP 交易业务. OLAP 分析系统. 数据库市场的细分格局. IDC 评论“第三代数据库技术”.

elvina
Download Presentation

列式数据库 + CEP = 完美分析系统

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 列式数据库+CEP= 完美分析系统 卢东明 技术总监,Sybase China

  2. 议题 Sybase列式数据库及其新发展 新解决方案 Sybase CEP和RAP

  3. Sybase的过去10年股票表现

  4. 传统行式数据库 内存数据库 列式数据库 更大量数据的分析 更多事务处理 OLTP 交易业务 OLAP 分析系统 数据库市场的细分格局

  5. IDC评论“第三代数据库技术” IDC Finds That a Third Generation of Database Technology Along with Vendors Are Shaking Up the Market12 Feb 2010 FRAMINGHAM, Mass., February 12, 2010 –.For database administrators (DBAs) and those who select and manage database management system (DBMS) technology that is based on conventional row-oriented, disk-based systems that drive queries in a linear fashion, a new generation of DBMS technology is sending a simple, clear message - 'Everything you know is wrong'. Recent IDC research shows that at the current rate of development and adoption, it is likely that within five years: Most data warehouses will be stored in a columnar fashion Most OLTP databases will either be augmented by an in-memory database (IMDB) or reside entirely in memory Most large-scale database servers will achieve horizontal scalability through clustering Many data collection and reporting problems will be solved with databases that have no formal schema at all.

  6. 主要数据库对比 行式数据库 TeraData SybaseIQ SybaseASE Oracle 列式数据库 IBM DB2 内存数据库 SolidDB TimesTen OLAP应用 OLTP应用 O 没有万能的数据库,数据库必然走向专业化

  7. 行式数据库市场

  8. 列式数据库市场

  9. Sybase IQ:数据仓库技术的领导者 Sybase's (Dublin, CA) IQ Analytics Server was the first of the column-store DBMS systems. It is available as a stand-alone DBMS and as a data warehouse appliance. Sybase also correctly positions Sybase IQ as a performance-capable tool for data marts as well as data warehouses. Strengths Sybase IQ achieves data compression ranging from two to five times compression, depending on the structure of the data. Because analytics typically makes use of fewer columns but larger numbers of rows, Sybase IQ performs very well for analytic applications. The company has been consistently winning POCs with analytic applications, on occasion, with a performance of 100 times greater. This makes Sybase IQ an extremely desirable DBMS platform for an analytic data mart to optimize and enhance an organization's overall data warehouse architecture. Over the past two years, Sybase has increased its Sybase IQ engineering FTEs by more than 70%, as well as its marketing/sales staffing — demonstrating significant commitment.

  10. 列式数据库是革命性的 传统行式数据库 • 数据是按行存储的 • 没有索引的查询使用大量I/O • 建立索引和物化视图需要花费大量时间和资源 • 面对查询的需求,数据库必须被大量膨胀才能满足性能要求 c1 c2 c3 c4 c5 c6 c7 c8 c9 … r1 r2 r3 r4 r5 列式数据库 • 数据按列存储 – 每一列单独存放 • 数据即是索引 • 只访问查询涉及的列 – 大量降低系统IO • 每一列由一个线索来处理 – 查询的并发处理 • 数据类型一致,数据特征相似 – 方便压缩 c1 c2 c3 c4 c5 c6 c7 c8 c9 … r1 r2 r3 r4 r5

  11. 多:1 PB 股票交易数据 (6万亿条股票报价) 快:2850亿行/天 (300万行/秒) 杂:非结构化数据: 26 TB/天 小:在IQ里压缩成159 TB 便宜:低端存储,价格成倍下降 压缩比:6.3倍 相比行式数据库可能是六分之一的空间几十分之一的代价 使用列式数据库

  12. 列式数据库 vs. 行式数据库

  13. 列式数据库(Columnar Database)潮流 • Google的Bigtable, Yahoo的解决方案基于PostgreSQL • Sybase IQ: 第一个也是最成熟的列式数据库 • 1994/10, Sybase收购了Expressway Technologies • 最初的名字是“IQ Accelerator” • 2009年推出的Sybase IQ15版有多项创新科技 • 其他新兴创业公司: Vertica (创始人 Michael Stonebreaker是Ingres和PostgreSQL的创始人), SAND,Clearpace

  14. 国外列式数据库的用户 • 尼尔森媒体研究: 5020亿条数据(2005年全球第一名) -- 15年的收视数据 • 美国税务局(IRS): 全美国所有报税人7年报税记录(及原始文档) (15亿条记录) • 花旗银行: Sybase IQ保存6年所有交易记录,HR数据及文档 • 联邦快递(FedEx): 全球所有送递品的海关报关单

  15. 国内列式数据库用户 • 电信业:中国移动,中国电信,中国联通,中兴通讯 • 中国移动:短信/彩信统计分析,报表系统 • 金融业:交行,浦发,HSBC,商业银行,天平保险,平安保险, • 中国农业银行:“银行卡统计分析系统” 获得世界IT精英组织(COMPUTERWORLD HONORS PROGRAM —— 计算机世界荣誉奖励计划,简称CHP)授予“2008年Computerworld荣誉桂冠” • 政府:公安部门,海关,东莞市数字城市 • 能源交通:铁道部,国家电网,中石化加油卡,南方航空,广州地铁 • 铁道部:客票系统分析 • 零售物流:丹尼斯百货,百丽

  16. Sales Case Studies 成功案例分享 某电信设备商--日志报表系统

  17. 原系统与基于IQ的系统结构对比 原系统为红叉前,基于IQ的系统为去掉红叉的部分,及蓝线的过程

  18. Sybase IQvs 原有系统--性能

  19. Sybase IQ vs 原有系统--硬件成本

  20. Sybase IQvs 原有系统--软件成本

  21. Sybase IQ IQ 15.0 新功能 • Load 性能提升 • 3位FP索引 • 新的并行架构 • 更好的查询性能 • 表空间和分区 • Sybase Central改进 • Multiplex 架构 • 安全性提高

  22. 更强的压缩能力IQ FP 索引 :FP(1),FP(2),FP(3) • 唯一值数量 • - FP(1): <256 • - FP(2): 256 - 65536 • - FP(3): 65537 - 16777216 • - Flat FP: >16777216 3-byte FP索引巩固了Sybase IQ数据压缩的领先优势。

  23. 3FP 索引更高的磁盘压缩 • 优点 • 优化Cache分配 • 占用更少的磁盘空间 • 查询处理更快 • 查询使用的资源更少 • 特点 • 一种新的索引带来更好的数据压缩能力。 • In-memory 压缩提高查询执行效率、降低查询执行代价。 • Hash对象处理更高效。 20,000,000条记录的压缩比较

  24. 查询性能提升 • 并发查询 • 优势 • 查询速度更快 • 单个查询更充分的利用可用的CPU资源 • 增加CPU资源扩充系统处理能力。 • 特点 • 大部分查询并行度更高,特别是 joins, Group Bys, and sorts • 查询计划能够清晰的反映出并行处理查询的细节 • 在 IQ 15.0中: • 更多的并发处理 • In-memory 压缩 • 更大的磁盘压缩 • 更灵活的查询处理 • 子查询优化 • 并发 Hash Join • 并发 Merge Join • 并发 Group-By • 并发 Complex Predicates

  25. IQ 15.x: 信息生命周期管理: 分级存储 Sep Aug Jul Jun Move Partition to Lower-Cost Storage Load “Hottest” Data to Fastest Storage Drop Oldest Partition Fibre Channel or Solid State SAS or eSATA Mar Feb Jan Dec Jun May Apr Place “Hottest” Partitions in Fast Storage Move Partitions to Lower-Cost Storage Over Time

  26. 并行多表数据加载 Sybase ETL v4.8 Grid Scale out Scale out ETL project 1 ETL project 2 ETL project 3 R/W R/W RO RO R/W Scale out Scale out Node 1 Node 1 Node 1 Node 1 Node 1 Sybase IQ v15 Grid

  27. SYBASE IQ: 展望未来 • Near Future • Data explosion • Real time analytics • Unstructed data analytics • Cloud computing • Total cost of ownership • Today • Multiple Terabytes • Exponential user growth • Requirements pushing analytics into the database • Analytics at the heart of the business • 5 years ago • Small datasets • Few users • Real time analytics non-existent • Applications do the hard work • Analytics not core to the business Customer Analytics Requirements

  28. 议题 Sybase列式数据库及其新发展 新解决方案 Sybase CEP和RAP

  29. 算法交易

  30. 从数据中分析规律 交易规则 IF AMD price moves outside 2% of AMD-15-minute-VWAP FOLLOWED-BY ( S&P moving by 0.5% AND ( AMD’s price moves up by 5% OR INTEL’s price moves down by 2% ) ) ALL WITHIN any 2 minute time period THEN BUY INTEL SELL AMD • 海量数据分析 • 实时事件处理 AMD

  31. CEP (Complex Event Processing 复杂事件处理) 事件的复杂度 传统商务智能技术 Complex Event Processing 复杂事件 消息队列Messaging & Routing Systems 简单事件 RDBMS 处理速度 人类速度(秒级到分钟级) 机器速度(毫秒级)

  32. 关系型数据库 vs 事件处理模型 先存储数据,然后查询、处理 为业务数据处理而优化 CEP Memory Processing Updates Updates Disk Polling Queries Alerts Actions Memory Disk • 随着数据的流动获取、分析数据 • 全新的方法论 • 把数据送到查询中 • 只加载极少量数据 • 优点: 超短延时 • 没有等待 • 实时提交结果

  33. SYBASE CEP体系结构 In-process Adapters Clustering & HA Real-time Analytics SQL-like Language In-Memory Cache Event Replay Event-Driven Reads/Writes Sybase CEP Studio & SDKs Sybase CEP Engine Out-of-process Adapters Out-of-process Adapters 输入流 输出流 In-process Adapters External Databases & Applications Sybase RAP

  34. 持续计算语言 “Continuous Computation Language – CCL” Sybase CEP使用CCL编程,“SQL Like”流处理 CCL查询是持续执行的 CCL语言支持流处理,例如“窗口”,事件流的关键 数据库SQL查询可以与CCL混用,数据库与事件流信息相互补充

  35. Window Policiesin CCL

  36. Development – Output Control Last part of a query Defines behavior of query output Reduce Rate (Conflation) Delay Results Eliminate duplicates Types Row and Time based Most Recent Delayed First within interval

  37. Development – Output Control OUTPUT Clause OUTPUT EVERY 10 ROWS OUTPUT (ALL) EVERY 5 MINUTES OFFSET BY 3 SECONDS OUTPUT AFTER OUTPUT FIRST WITHIN OUTPUT AT

  38. Development – Output Control More Examples INSERT INTO StockVolumeOut SELECT SUM(volume) FROM StockTrades KEEP EVERY 1 DAY OUTPUT EVERY 5 SECONDS ; -- within interval INSERT INTO StockVolumeOut SELECT SUM(volume) FROM StockTrades KEEP EVERY 1 DAY OUTPUT ALL EVERY 5 SECONDS ; -- most recent INSERT INTO StockVolumeOut SELECT SUM(volume) FROM StockTrades KEEP EVERY 1 DAY OUTPUT AFTER 5 SECONDS ; -- delayed INSERT INTO StockVolumeOut SELECT SUM(volume) FROM StockTrades KEEP EVERY 1 DAY GROUP BY symbol OUTPUT FIRST WITHIN 5 SECONDS ; -- duplicate elimination

  39. 金融行业以外的应用 • 电信 • 预付费电话授权,欺诈分析,网络监控,入侵检测/防范,会话管理 • 政府,安全及监控 • 情报监控,战地协调,国土安全 • 实时供应链/物流/制造业 • 库存准确性,送货确认,质量跟踪

  40. 金融行业以外的应用 • 交通运输业 • 风险控制,调度,派送,路线规划 • 互联网/Web • 点击流分析,网络游戏,入侵监控/防范  • RFID • 库存管理,集装箱跟踪,ID牌及安全控制,

  41. 金融行业以外的应用 • 零售业 • 产品关联分析,CRM, 库存管理,订单管理,脱销,POS • 媒体和娱乐业 • 内容及服务的动态包装,版权付费 • 医疗卫生/保险 • 资产管理,理赔操作,账单管理,欺诈分析

  42. 名词 – 动词 • 数据 – 规则 • 前台 – 后台 • 出拳 – 收拳 • OLTP–OLAP • 行式数据库 – 列式数据库 实施 积累 列式数据库+CEP= 分析系统的完美组合 分析 制定

More Related