Optimal Column Layout for Hybrid Workloads

Data-intensive analytical applications need to support both efficient reads and writes. However, what is usually a good data layout for an update-heavy workload, is not well-suited for a read-mostly one and vice versa. Modern analytical data systems rely on columnar layouts and employ delta stores to inject new data and updates. We show that for hybrid workloads we can achieve close to one order of magnitude better performance by tailoring the column layout design to the data and query workload. Our approach navigates the possible design space of the physical layout: it organizes each column’s data by determining the number of partitions, their corresponding sizes and ranges, and the amount of buffer space and how it is allocated. We frame these design decisions as an optimization problem that, given workload knowledge and performance requirements, provides an optimal physical layout for the workload at hand. To evaluate this work, we build an in-memory storage engine, Casper, and we show that it outperforms state-of-the-art data layouts of analytical systems for hybrid workloads. Casper delivers up to 2.32× higher throughput for update-intensive workloads and up to 2.14× higher throughput for hybrid workloads. We further show how to make data layout decisions robust to workload variation by carefully selecting the input of the optimization. PVLDB Reference Format: Manos Athanassoulis, Kenneth S. Bøgh, Stratos Idreos. Optimal Column Layout for Hybrid Workloads. PVLDB, 12(13): 2393-2407, 2019. DOI: https://doi.org/10.14778/3358701.3358707

[1]  Guido Moerkotte,et al.  Small Materialized Aggregates: A Light Weight Index Structure for Data Warehousing , 1998, VLDB.

[2]  Geoffrey J. Gordon,et al.  Automatic Database Management System Tuning Through Large-scale Machine Learning , 2017, SIGMOD Conference.

[3]  Anastasia Ailamaki,et al.  Designing Access Methods: The RUM Conjecture , 2016, EDBT.

[4]  Martin L. Kersten,et al.  Updating a cracked database , 2007, SIGMOD '07.

[5]  David J. DeWitt,et al.  Weaving Relations for Cache Performance , 2001, VLDB.

[6]  Marcin Zukowski,et al.  Vectorwise: Beyond Column Stores , 2012, IEEE Data Eng. Bull..

[7]  Lin Ma,et al.  Query-based Workload Forecasting for Self-Driving Database Management Systems , 2018, SIGMOD Conference.

[8]  Anastasia Ailamaki,et al.  H2O: a hands-free adaptive store , 2014, SIGMOD Conference.

[9]  Harumi A. Kuno,et al.  Self-selecting, self-tuning, incrementally optimized indexes , 2010, EDBT '10.

[10]  Martin L. Kersten,et al.  Database Cracking , 2007, CIDR.

[11]  Johannes Bisschop,et al.  AIMMS - Optimization Modeling , 2006 .

[12]  Liwen Sun,et al.  Skipping-oriented Partitioning for Columnar Layouts , 2016, Proc. VLDB Endow..

[13]  Michael A. Bender,et al.  An adaptive packed-memory array , 2007, TODS.

[14]  Liwen Sun,et al.  Fine-grained partitioning for aggressive data skipping , 2014, SIGMOD Conference.

[15]  Hasso Plattner,et al.  A common database approach for OLTP and OLAP using an in-memory column database , 2009, SIGMOD Conference.

[16]  Carlo Curino,et al.  Schism , 2010, Proc. VLDB Endow..

[17]  Anastasia Ailamaki,et al.  Slalom: Coasting Through Raw Data via Adaptive Partitioning and Indexing , 2017, Proc. VLDB Endow..

[18]  Ippokratis Pandis,et al.  PLP: Page Latch-free Shared-everything OLTP , 2011, Proc. VLDB Endow..

[19]  Karsten Schmidt,et al.  Autonomous Management of Soft Indexes , 2007, 2007 IEEE 23rd International Conference on Data Engineering Workshop.

[20]  Dennis Shasha,et al.  Utilization of B-trees with inserts, deletes and modifies , 1989, PODS '89.

[21]  Knud D. Andersen,et al.  The Mosek Interior Point Optimizer for Linear Programming: An Implementation of the Homogeneous Algorithm , 2000 .

[22]  Alfons Kemper,et al.  HyPer: A hybrid OLTP&OLAP main memory database system based on virtual memory snapshots , 2011, 2011 IEEE 27th International Conference on Data Engineering.

[23]  Jignesh M. Patel,et al.  Design and Evaluation of Storage Organizations for Read-Optimized Main Memory Databases , 2013, Proc. VLDB Endow..

[24]  Surajit Chaudhuri,et al.  Database tuning advisor for microsoft SQL server 2005: demo , 2005, SIGMOD '05.

[25]  Alfons Kemper,et al.  Data Blocks: Hybrid OLTP and OLAP on Compressed Storage using both Vectorization and Compilation , 2016, SIGMOD Conference.

[26]  Anastasia Ailamaki,et al.  The Case For Heterogeneous HTAP , 2017, CIDR.

[27]  Norman May,et al.  The SAP HANA Database -- An Architecture Overview , 2012, IEEE Data Eng. Bull..

[28]  Manos Athanassoulis,et al.  Monkey: Optimal Navigable Key-Value Store , 2017, SIGMOD Conference.

[29]  Michael Stonebraker,et al.  C-Store: A Column-oriented DBMS , 2005, VLDB.

[30]  Nikita Shamgunov The MemSQL In-Memory Database System , 2014, IMDM@VLDB.

[31]  Patrick E. O'Neil,et al.  The log-structured merge-tree (LSM-tree) , 1996, Acta Informatica.

[32]  Campbell Fraser,et al.  Enhancements to SQL server column stores , 2013, SIGMOD '13.

[33]  Donald Kossmann,et al.  Fast Scans on Key-Value Stores , 2017, Proc. VLDB Endow..

[34]  Gustavo Alonso,et al.  BatchDB: Efficient Isolated Execution of Hybrid OLTP+OLAP Workloads for Interactive Applications , 2017, SIGMOD Conference.

[35]  Sam Lightstone,et al.  Physical Database Design for Relational Databases , 2009, Encyclopedia of Database Systems.

[36]  Weiyun Huang,et al.  Real-Time Analytical Processing with SQL Server , 2015, Proc. VLDB Endow..

[37]  Manos Athanassoulis,et al.  Optimal Bloom Filters and Adaptive Merging for LSM-Trees , 2018, ACM Trans. Database Syst..

[38]  Surajit Chaudhuri,et al.  An Efficient Cost-Driven Index Selection Tool for Microsoft SQL Server , 1997, VLDB.

[39]  Martin L. Kersten,et al.  MonetDB: Two Decades of Research in Column-oriented Database Architectures , 2012, IEEE Data Eng. Bull..

[40]  Michael Stonebraker,et al.  Clay: Fine-Grained Adaptive Partitioning for General Database Schemas , 2016, Proc. VLDB Endow..

[41]  Andrew Pavlo,et al.  Bridging the Archipelago between Row-Stores and Column-Stores for Hybrid Workloads , 2016, SIGMOD Conference.

[42]  Anastasia Ailamaki,et al.  MaSM: efficient online updates in data warehouses , 2011, SIGMOD '11.

[43]  Theo Härder Selecting an Optimal Set of Secondary Indices , 1976, ECI.

[44]  Vivek R. Narasayya,et al.  Integrating vertical and horizontal partitioning into automated physical database design , 2004, SIGMOD '04.

[45]  Manos Athanassoulis,et al.  Design Tradeoffs of Data Access Methods , 2016, SIGMOD Conference.

[46]  Domenico Saccà,et al.  Database partitioning in a cluster of processors , 1983, TODS.

[47]  Surajit Chaudhuri,et al.  To tune or not to tune?: a lightweight physical design alerter , 2006, VLDB.

[48]  Lin Ma,et al.  Self-Driving Database Management Systems , 2017, CIDR.

[49]  Dimitris Bertsimas,et al.  Robust Optimization for Unconstrained Simulation-Based Problems , 2010, Oper. Res..

[50]  Ashish Motivala,et al.  The Snowflake Elastic Data Warehouse , 2016, SIGMOD Conference.

[51]  Barzan Mozafari,et al.  CliffGuard: A Principled Framework for Finding Robust Database Designs , 2015, SIGMOD Conference.

[52]  Daniel J. Abadi,et al.  Integrating compression and execution in column-oriented database systems , 2006, SIGMOD Conference.

[53]  Jim Gray,et al.  A critique of ANSI SQL isolation levels , 1995, SIGMOD '95.

[54]  Carlo Curino,et al.  Skew-aware automatic database partitioning in shared-nothing, parallel OLTP systems , 2012, SIGMOD Conference.

[55]  Abdul Quamar,et al.  SWORD: scalable workload-aware data placement for transactional workloads , 2013, EDBT '13.

[56]  Stratos Idreos,et al.  The Data Calculator: Data Structure Design and Cost Synthesis from First Principles and Learned Cost Models , 2018, SIGMOD Conference.

[57]  Zheng Yan,et al.  UpBit: Scalable In-Memory Updatable Bitmap Indexing , 2016, SIGMOD Conference.

[58]  Marcin Zukowski,et al.  Positional update handling in column stores , 2010, SIGMOD Conference.

[59]  Michael A. Bender,et al.  Cache-oblivious B-trees , 2000, Proceedings 41st Annual Symposium on Foundations of Computer Science.

[60]  Badrish Chandramouli,et al.  FASTER: A Concurrent Key-Value Store with In-Place Updates , 2018, SIGMOD Conference.

[61]  Sam Lightstone,et al.  DB2 Design Advisor: Integrated Automatic Physical Database Design , 2004, VLDB.

[62]  Surajit Chaudhuri,et al.  Database Tuning Advisor for Microsoft SQL Server 2005 , 2004, VLDB.

[63]  Alfons Kemper,et al.  Fast Serializable Multi-Version Concurrency Control for Main-Memory Database Systems , 2015, SIGMOD Conference.

[64]  Surajit Chaudhuri,et al.  An Online Approach to Physical Design Tuning , 2007, 2007 IEEE 23rd International Conference on Data Engineering.

[65]  Anastasia Ailamaki,et al.  Online Updates on Data Warehouses via Judicious Use of Solid-State Storage , 2015, TODS.

[66]  Martin Grund,et al.  Efficient Transaction Processing for Hyrise in Mixed Workload Environments , 2014, IMDM@VLDB.

[67]  Ramakrishna Varadarajan,et al.  The Vertica Analytic Database: C-Store 7 Years Later , 2012, Proc. VLDB Endow..

[68]  Dinesh Das,et al.  Oracle Database In-Memory: A dual format in-memory database , 2015, 2015 IEEE 31st International Conference on Data Engineering.

[69]  Yuanyuan Tian,et al.  Hybrid Transactional/Analytical Processing: A Survey , 2017, SIGMOD Conference.

[70]  Sam Lightstone,et al.  In-memory BLU acceleration in IBM's DB2 and dashDB: Optimized for modern workloads and hardware architectures , 2015, 2015 IEEE 31st International Conference on Data Engineering.

[71]  Tim Kraska,et al.  The Case for Learned Index Structures , 2018 .

[72]  Adam Silberstein,et al.  Benchmarking cloud serving systems with YCSB , 2010, SoCC '10.

[73]  Samuel Madden,et al.  Partitioning techniques for fine-grained indexing , 2011, 2011 IEEE 27th International Conference on Data Engineering.

[74]  Wolfgang Lehner,et al.  SAP HANA: The Evolution from a Modern Main-Memory Data Platform to an Enterprise Application Platform , 2013, Proc. VLDB Endow..

[75]  Abdul Wasay,et al.  The Periodic Table of Data Structures , 2018, IEEE Data Eng. Bull..

[76]  Marcin Zukowski,et al.  Super-Scalar RAM-CPU Cache Compression , 2006, 22nd International Conference on Data Engineering (ICDE'06).

[77]  Serge Abiteboul,et al.  COLT: Continuous On-Line Database Tuning , 2006 .