付费下载
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、数据仓库和列存储索引改进面向关键任务的高性能平台 - SQL Server 2014王辉 | MVP | MCT C1C2C3C5C6C4Existing Tables (Partitions)Needed columnsColumnstore Index RepresentationIn-Memory In the Data WarehouseData Stored Row-Wise: Heaps, b-Trees, Key-Value2In-Memory ColumnStoreBoth memory and diskBuilt-in to core RDBMS engineCustomer
2、 Benefits:10-100 x fasterReduced design effortWork on customers existing hardwareEasy upgrade; Easy deployment“By using SQL Server 2012 In-Memory ColumnStore, we were able to extract about 100 million records in 2 or 3 seconds versus the 30 minutes required previously. “- Atsuo Nakajima Asst Directo
3、r, Bank of Nagoya Traditional Storage ModelsData Stored Row-Wise: Heaps, b-Trees, Key-Value3Relational, dimensional, map reduce In-Memory DW Storage ModelData Stored Column-wise4Each page stores data from a single columnHighly compressedMore data fits in memoryEach column can be accessed independent
4、lyFetch only columns neededCan dramatically decrease I/OC1C2C3C5C6C4In-Memory DW Index StructureRow Groups & Segments5A segment contains values for one column for a set of rowsSegments for the same set of rows comprise a row groupSegments are compressedEach segment stored in a separate LOBSegment is
5、 unit of transfer between disk and memorySegmentsC1C2C3C5C6C4Row groupIn-Memory DW IndexProcessing an Example6Horizontally PartitionRow Groups7Vertical PartitionSegments8Compress Each Segment*Some Compress More than Others9*Encoding and reordering not shownFetch Only Needed ColumnsSegment Eliminatio
6、n10Fetch Only Needed SegmentsSegment Elimination11Batch ModeImproving CPU Utilization12Biggest advancement in query processing in years! Data moves in batch through query plan operatorsMinimizes instructions per rowTakes advantage of cache structuresHighly efficient algorithmsBetter parallelismBatch
7、 Mode ProcessingQP Vector Operators13Process 1000 rows at a timeBatch stored in vector formOptimized to fit in cacheVector operators implementedFilter, hash join, hash aggregation, Greatly reduced CPU time (7 to 40X)bitmap of qualifying rowsColumn vectorsBatch objectIn-Memory DW: Clustered & Updatab
8、le14Fast execution for data warehouse queriesSpeedups of 10 x and moreNo need for separate base tableSave spaceData can be inserted, updated or deletedSimpler managementEliminate need for other indexesSave space and simpler managementMore data types supportedTable consists of column store and row st
9、oreDML (update, delete, insert) operations leverage delta storeINSERT ValuesAlways lands into delta storeDELETELogical operationData physically remove after REBUILD operation is performed.UPDATEDELETE followed by INSERT.BULK INSERTif batch 100k, inserts go into delta store, otherwise columnstoreSELE
10、CT Unifies data from Column and Row stores - internal UNION operation.“Tuple mover” converts data into columnar format once segment is full (1M of rows)REORGANIZE statement forces tuple mover to start.Updatable Columnstore IndexC1C2C3C5C6C4ColumnStoreC1C2C3C5C6C4Delta (row)storetuple moverComparing
11、Space Savings101 Million Row Table + Index Space16Structure of In-Memory DWHow It Works17CREATE CLUSTERED COLUMNSTOREOrganizes and compresses data into columnstoreBULK INSERTCreates new columnstore row groupsINSERTRows are placed in the row store (heap)When row store is big enough, a new columnstore
12、 row group is createdColumnStoreDeletedBitmapRow StorePartitionStructure of In-Memory DWHow It Works (contd)DELETERows are marked in the deleted bitmapUPDATEDelete plus insertMost data is in columnstore formatColumnStoreDeletedBitmapRow StorePartitionBatch Mode ProcessingWhats New? 19SQL Server 2014
13、Support for all flavors of JOINsOUTER JOINSemi-join: IN, NOT INUNION ALLScalar aggregatesMixed mode plansImprovements in bitmaps, spill support, Global Batch AggregationWhats New?20Replaces a set of three operators in the query plan Local (partial) batch aggregationRow aggregation, somewhere above i
14、tRepartition exchanges, somewhere between themImproves scenarios with large aggregation outputProcess the same data with less memory than local batch aggregationBetter performance than local batch aggregation, example big hash tablesRemoves the need for row mode aggregation in mostly batch query pla
15、ns, resulting in less data conversion and better management of granted memoryArchival CompressionWhats New?21Adds an additional layer of compression on top of the inherent compression used by columnstoreShrink on-disk database sizes by up to 27%Compression applies per partition and can be set either
16、 during index creation or during rebuildEnhanced CompressionTPCH3.1XTPCDS2.8XCustomer 13.9XCustomer 24.3X* compression measured against raw data fileARCHIVAL CompressionCOLUMNSTORE CompressionDefault compression when creating a table with Clustered Columnstore IndexTypical customer workloads gets 5-
17、7x compression ratiosEnables additional 30% compression for whole table and/or chosen partitions.Going back and forth between columnstore and columnstore_archive compressions.sys.partitions exposes compression info (3 columnstore, 4 columnstore_archive)Table compression options: PRESSION = NONE | RO
18、W | PAGE | COLUMNSTORE | COLUMNSTORE_ARCHIVE Partitioning ColumnStoresThe Basic Mechanism23The motivation is manageability over performanceCREATE TABLE ( )As usualCREATE CLUSTERED COLUMNSTORE INDEX on Converts entire table to Columnstore formatBULK INSERT, SELECT INTOINSERTUPDATEDELETEInsert & Updat
19、ing DataLoad Sizes24Bulk insertCreates row groups of 1Million rows, last row group is probably not fullBut if 100K rows, will be left in Row StoreInsert/UpdateCollects rows in Row StoreTuple MoverWhen Row Store reaches 1Million rows, convert to a ColumnStore Row GroupRuns every 5 minutes by defaultS
20、tarted explicitly by ALTER INDEX ON REORGANIZEBuilding Index in ColumnStoreMaking Them Fast25Memory resource intensiveMemory requirement related to number of columns, data, DOPUnit of parallelism is the segmentLots of segments, lots of potential parallelism Low memory throttles parallelismIncrease the max server memory optionSet min server memory to a large i
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 【2026年】煤矿井下机电运输综合安管员理论考试模拟试题【附答案】
- 【2026年】福建省南安市桥式起重机 Q2 证考试模拟试题【附答案】
- 河北省唐山市路南区2025-2026三年级上学期英语期末学情调研(2026.1)(含答案)
- 超星尔雅《中国书法史(南开大学)》章节测试答案
- 产后骨盆矫正技师岗位招聘考试试卷及答案
- 10道不定积分计算练习题及参考答案A8
- 供热检修考试题(含答案)
- 克东县社工招聘考试题目及答案
- 2026年水利三类人员专职安全生产管理基础知识考试题库及答案
- 2026年竞聘校长试题及答案
- 北京工业大学《物理实验》2024 - 2025 学年第一学期期末试卷
- 定密责任人培训班试题及答案
- (外研2024版新教材)英语五上Unit 1基础测试卷(含答案+听力音频)
- 智慧高速机电系统集成方案指南
- 适航法规培训课件
- 单位出版书籍管理制度
- 新时代教师职业行为十项准则解读
- 表达感谢感激感恩的话
- 大空间建筑铝合金结构防火技术标准 DG-TJ08-2420-2023
- 狂犬病的教学课件
- 海克斯康三坐标操作指导书
评论
0/150
提交评论