Query Processing and Optimizing on SSDs Flash Group Qingling Cao

Slides:



Advertisements
Similar presentations
Arjun Suresh S7, R College of Engineering Trivandrum.
Advertisements

Equality Join R X R.A=S.B S : : Relation R M PagesN Pages Relation S Pr records per page Ps records per page.
CS 4432query processing - lecture 161 CS4432: Database Systems II Lecture #16 Join Processing Algorithms Professor Elke A. Rundensteiner.
6.830 Lecture 9 10/1/2014 Join Algorithms. Database Internals Outline Front End Admission Control Connection Management (sql) Parser (parse tree) Rewriter.
External Sorting CS634 Lecture 10, Mar 5, 2014 Slides based on “Database Management Systems” 3 rd ed, Ramakrishnan and Gehrke.
1 HYRISE – A Main Memory Hybrid Storage Engine By: Martin Grund, Jens Krüger, Hasso Plattner, Alexander Zeier, Philippe Cudre-Mauroux, Samuel Madden, VLDB.
Shimin Chen Big Data Reading Group Presented and modified by Randall Parabicoli.
Shimin Chen Big Data Reading Group.  Energy efficiency of: ◦ Single-machine instance of DBMS ◦ Standard server-grade hardware components ◦ A wide spectrum.
1 External Sorting Chapter Why Sort?  A classic problem in computer science!  Data requested in sorted order  e.g., find students in increasing.
Introduction to Database Systems 1 Join Algorithms Query Processing: Lecture 1.
External Sorting 198:541. Why Sort?  A classic problem in computer science!  Data requested in sorted order e.g., find students in increasing gpa order.
1 External Sorting for Query Processing Yanlei Diao UMass Amherst Feb 27, 2007 Slides Courtesy of R. Ramakrishnan and J. Gehrke.
Access Path Selection in a Relation Database Management System (summarized in section 2)
Gordon: Using Flash Memory to Build Fast, Power-efficient Clusters for Data-intensive Applications A. Caulfield, L. Grupp, S. Swanson, UCSD, ASPLOS’09.
External Sorting Chapter 13.. Why Sort? A classic problem in computer science! Data requested in sorted order  e.g., find students in increasing gpa.
Analyzing the Energy Efficiency of a Database Server Hanskamal Patel SE 521.
Buying a Laptop. 3 Main Components The 3 main components to consider when buying a laptop or computer are Processor – The Bigger the Ghz the faster the.
Slide 1 Windows PC Accelerators Reporter :吳柏良. Slide 2 Outline l Introduction l Windows SuperFetch l Windows ReadyBoost l Windows ReadyDrive l Conclusion.
Lecture 11: DMBS Internals
C-Store: Column Stores over Solid State Drives Jianlin Feng School of Software SUN YAT-SEN UNIVERSITY Jun 19, 2009.
Flash research report Da Zhou Outline Query Processing Techniques for Solid St ate Drives (Research Paper) Join Processing for Flash SSDs: Rememb.
Flashing Up the Storage Layer I. Koltsidas, S. D. Viglas (U of Edinburgh), VLDB 2008 Shimin Chen Big Data Reading Group.
© Stavros Harizopoulos 2006 Performance Tradeoffs in Read-Optimized Databases Stavros Harizopoulos MIT CSAIL joint work with: Velen Liang, Daniel Abadi,
Ashwani Roy Understanding Graphical Execution Plans Level 200.
Performance Tradeoffs in Read-Optimized Databases Stavros Harizopoulos * MIT CSAIL joint work with: Velen Liang, Daniel Abadi, and Sam Madden massachusetts.
© Stavros Harizopoulos 2006 Performance Tradeoffs in Read- Optimized Databases: from a Data Layout Perspective Stavros Harizopoulos MIT CSAIL Modified.
A Case for Flash Memory SSD in Enterprise Database Applications Authors: Sang-Won Lee, Bongki Moon, Chanik Park, Jae-Myung Kim, Sang-Woo Kim Published.
Sorting.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 External Sorting Chapter 13.
Database Management Systems, R. Ramakrishnan and J. Gehrke 1 External Sorting Chapter 13.
Prof. Bayer, DWH, Ch.5, SS Chapter 5. Indexing for DWH D1Facts D2.
DMBS Internals I. What Should a DBMS Do? Store large amounts of data Process queries efficiently Allow multiple users to access the database concurrently.
Buffer-pool aware Query Optimization Ravishankar Ramamurthy David DeWitt University of Wisconsin, Madison.
연세대학교 Yonsei University Data Processing Systems for Solid State Drive Yonsei University Mincheol Shin
Query Optimization CMPE 226 Database Systems By, Arjun Gangisetty
Introduction to Database Systems1 External Sorting Query Processing: Topic 0.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 External Sorting Chapters 13: 13.1—13.5.
DMBS Internals I February 24 th, What Should a DBMS Do? Store large amounts of data Process queries efficiently Allow multiple users to access the.
DMBS Internals I. What Should a DBMS Do? Store large amounts of data Process queries efficiently Allow multiple users to access the database concurrently.
DMBS Architecture May 15 th, Generic Architecture Query compiler/optimizer Execution engine Index/record mgr. Buffer manager Storage manager storage.
Database Management Systems, R. Ramakrishnan and J. Gehrke1 External Sorting Chapter 11.
External Sorting. Why Sort? A classic problem in computer science! Data requested in sorted order –e.g., find students in increasing gpa order Sorting.
Fan Qi Database Lab 1, com1 #01-08 CS3223 Tutorial 6.
Computer Performance. Hard Drive - HDD Stores your files, programs, and information. If it gets full, you can’t save any more. Measured in bytes (KB,
External Sorting Jianlin Feng School of Software SUN YAT-SEN UNIVERSITY courtesy of Joe Hellerstein for some slides.
CS 405G: Introduction to Database Systems Instructor: Jinze Liu Fall 2007.
What Should a DBMS Do? Store large amounts of data Process queries efficiently Allow multiple users to access the database concurrently and safely. Provide.
DATABASE OPERATORS AND SOLID STATE DRIVES Geetali Tyagi ( ) Mahima Malik ( ) Shrey Gupta ( ) Vedanshi Kataria ( )
Select Operation Strategies And Indexing (Chapter 8)
Indexing strategies and good physical designs for performance tuning Kenneth Ureña /SpanishPASSVC.
How is data stored? ● Table and index Data are stored in blocks(aka Page). ● All IO is done at least one block at a time. ● Typical block size is 8Kb.
Join Processing for Flash SSDs: Remembering Past Lessons
CPS216: Data-intensive Computing Systems
Lecture 16: Data Storage Wednesday, November 6, 2006.
Database Management Systems (CS 564)
Join Processing for Flash SSDs: Remembering Past Lessons
Hustle and Bustle of SQL Pages
Evaluation of Relational Operations
Lecture 11: DMBS Internals
Oracle Storage Performance Studies
Lecture 9: Data Storage and IO Models
CS 140 Lecture Notes: Technology and Operating Systems
External Sorting The slides for this text are organized into chapters. This lecture covers Chapter 11. Chapter 1: Introduction to Database Systems Chapter.
Yan Huang - CSCI5330 Database Implementation – Access Methods
CS 140 Lecture Notes: Technology and Operating Systems
Selected Topics: External Sorting, Join Algorithms, …
Chapter 13: Data Storage Structures
External Sorting.
Database Systems (資料庫系統)
Lecture 18: DMBS Overview and Data Storage
Presentation transcript:

Query Processing and Optimizing on SSDs Flash Group Qingling Cao

Introduction Page Layout on SSD Scan Approaches Conclusion Join Algorithms Outline

Introduction Page Layout on SSD Scan Approaches Conclusion Join Algorithms Outline

Page layout and data structure Leverage fast random read to speed up selection 、 projection and join operation Database query processing engines traditionally emphasize on sequential I/O Introduction

Page Layout on SSD Scan Approaches Conclusion Join Algorithms Outline

Page Layout on SSD Row Layout Column Layout - Attributes of one column stored in continuous pages slot

PAX Layout is efficient for SSD but not for disk. Why? Page Layout on SSD PAX Layout

Disk, the sequential read speed is 100MB/s. A skip takes 3-4ms. So a mini-page should be KB. Then full page size will be MB. IDE flash drive, the sequential read bandwidth is 28MB/s. Seek time is 0.25ms, so mini-page should be 7KB. Then full page size can be KB. Page Layout on SSD

Disk, the sequential read speed is 100MB/s. A skip takes 3-4ms. So a mini-page should be KB. Then full page size will be MB. IDE flash drive, the sequential read bandwidth is 28MB/s. Seek time is 0.25ms, so mini-page should be 7KB. Then full page size can be KB. Page Layout on SSD

Disk, the sequential read speed is 100MB/s. A skip takes 3-4ms. So a mini-page should be KB. Then full page size will be MB. IDE flash drive, the sequential read bandwidth is 28MB/s. Seek time is 0.25ms, so mini-page should be 7KB. Then full page size can be KB. Page Layout on SSD

Disk, the sequential read speed is 100MB/s. A skip takes 3-4ms. So a mini-page should be KB. Then full page size will be MB. IDE flash drive, the sequential read bandwidth is 28MB/s. Seek time is 0.25ms, so mini-page should be 7KB. Then full page size can be KB. Page Layout on SSD

Disk, the sequential read speed is 100MB/s. A skip takes 3-4ms. So a mini-page should be KB. Then full page size will be MB. IDE flash drive, the sequential read bandwidth is 28MB/s. Seek time is 0.25ms, so mini-page should be 7KB. Then full page size can be KB. Page Layout on SSD

Disk, the sequential read speed is 100MB/s. A skip takes 3-4ms. So a mini-page should be KB. Then full page size will be MB. IDE flash drive, the sequential read bandwidth is 28MB/s. Seek time is 0.25ms, so mini-page should be 7KB. Then full page size can be KB. Page Layout on SSD

Disk, the sequential read speed is 100MB/s. A skip takes 3-4ms. So a mini-page should be KB. Then full page size will be MB. IDE flash drive, the sequential read bandwidth is 28MB/s. Seek time is 0.25ms, so mini-page should be 7KB. Then full page size can be KB. Page Layout on SSD

Disk, the sequential read speed is 100MB/s. A skip takes 3-4ms. So a mini-page should be KB. Then full page size will be MB. IDE flash drive, the sequential read bandwidth is 28MB/s. Seek time is 0.25ms, so mini-page should be 7KB. Then full page size can be KB. Page Layout on SSD

Disk, the sequential read speed is 100MB/s. A skip takes 3-4ms. So a mini-page should be KB. Then full page size will be MB. IDE flash drive, the sequential read bandwidth is 28MB/s. Seek time is 0.25ms, so mini-page should be 7KB. Then full page size can be KB. Page Layout on SSD

Introduction Page Layout on SSD Scan Approaches Conclusion Join Algorithms Outline

NSMScan – Always read the whole relation. FlashScan – Read only the related columns. e.g. select S from R where J Scan Approaches

FlashScanOPT(U) – read only the mini-pages consist the tuples needed. e.g. select S from R where J FlashScanOPT(S) – Attributes are sorted, so the mini-pages are read at most once. Scan Approaches

Table: 70m tuples, 11columns, 10GB System: Intel Core 2 Duo at 2.33GHz, 4GB of RAM Mtron 32GB SSD

Introduction Page Layout on SSD Scan Approaches Conclusion Join Algorithms Outline

Block Nested Loops Join Sort-Merge Join Grace Hash Join Hybrid Hash Join Join Algorithms – past lessons

☆ Algorithms that stress random reads, and avoid random writes as much as possible see bigger improvements on flash Join Algorithms – past lessons Customer: 450w tuples, 730MB Order: 4500w tuples, 5GB HDD: 5400RPM, 320GB SSD: OCZ Core series 60GB SATA II

Join Algorithms – RARE-join J1 J2 Select Name, Team from Player, Game where Player.Team=Game.Geam Player Game Blue, P:4 Green, P:3 Red, P:2 → Red, P:5 Orange, P:1 → Orange, P:6 Blue, G:4 Red, G:1 Orange, G:2 → Orange, G:3

Join Algorithms – RARE-join Join Index : Total I/O cost: |J1|+ σ 1 |V1|+|J2|+ σ 2 |V2| Join Result :

Join Algorithms – FlashJoin Read(A) Read(D) hashA, id1hashD, id2 hashG, id1,id2 hashK, id3 id1,id2,id3 id1,id2

Join Algorithms – Fetch Kernel Join Index : Join Index : Each page is read no more than once.

Join Algorithms – Fetch Kernel Join Index : Join Index :

Join Algorithms – FlashJoin R: 70m tuples, 10GB S: 7m tuples, 1GB System: Intel Core 2 Duo at 2.33GHz, 4GB of RAM Mtron 32GB SSD

Row-based {JI, id x, id y } Minimize the IO to fetch the join result Join Algorithms – DigestJoin

Sort-merge join Join results are clustered Memory is enough Fetch the pages of the tuples as soon as they are produced Join Algorithms – Page Fetching(1)

Fetching instruction table Join candidate table Join Index: (x 1,A:1,C:1) (x 2,B:1,D:1) (x 3,A:2,C:2) (x 4,B:2,D:2) ft1={A:1, B:1, A:2, B:2} ft2={C:1, D:1, C:2, D:2} Join Algorithms – Page Fetching(2) jct1={x1,x2,x3,x4} jct2={y1,y2,y3,y4} ft1={A:1, A:2, B:1, B:2} ft2={C:1, C:2, D:1, D:2}

Join Graph G=(V 1 ∪ V 2, E) E  V 1  V 2 Segment e.g. {1, a, b, c}, {a, 1, 2} Join Algorithms – Page Fetching(3)

Required storage size(RSS) Required cache size(RCS)

Introduction Page Layout on SSD Scan Approaches Conclusion Join Algorithms Outline

Scan algorithm has little room for improvement. RARE-Join 、 FlashJoin. No write. Join index will be sorted many times. The size of minipage is not fixed. Conclusion PAX:

Row: DigestJoin. IO is much more than other join algorithms. Column: None Storage is more flexible. Utilize the technology of tuple reconstruction. Conclusion