SlideShare a Scribd company logo
Sub-Join: A Query Optimization Algorithm for Flash-based Database   Zhichao Liang, Da Zhou, Xiaofeng Meng 2009-10-11
Outline Background Motivation Related works Our method : Sub-Join Performance Evaluation Summary
Two important characteristics  of flash memory - faster data access (random read) - worse random write Background Read Write Erase Time  25 200 1.5
Motivation Read& Write Throughput (Mb/s) Time of join for Oracle Berkeley DB (s) HDD SSD Ratio Random Read  3.80 70.76 18.62 Sequential Read  37.45 73.08 1.95 Random Write 3.73 3.71 0.99 Sequential Write 37.69 68.52 1.82 HDD SSD Ratio Time 2.71 1.96 1.38
Motivation (cont.) Flash offers little or no benefit when used as a simple drop-in replacement for disk Traditional query processing algorithms for data analysis are tuned for disks They avoid random I/O operations but exploit sequential I/O operations whenever possible So, they fail to take advantage of the fast random reads of flash drives
Related works PAX Layout &  RARE-join by Mehul A. Shah Fast scans and joins using flash drives [C]// Luo Q, Ross K A. Proceedings of 4th Workshop on Data Management on New Hardware. New York: ACM Press, 2008: 17-24.   Subset by Daniel Myers  MIT CSAIL Research Abstracts [EB/OL].2007[2009-7-19] On the Use of NAND Flash Memory in High-Performance Relational Databases[D]. Massachusetts:MIT,2008.   DigestJoin by Yu Li  DigestJoin: Exploiting Fast Random Reads for Flash-based Joins [C]// Lee W C, King C T, Pitoura E. Proceedings of the 10th International Conference on Mobile Data Management. TaiPei: IEEE Computer Society Press, 2009: 152-161.
Our method : Sub-Join The Framework of Sub-Join Algorithm   Sub-Table Construct Sub-Table Join Data Call Back
Our method : Sub-Join (cont.) Sub-Table Construct: - less data volume to read  lower read cost - more tuples in main memory  less I/O operations Column-Stores in Sub-Table - avoid random write  lower write cost - sequential read  faster data access A_ID A_Join
Our method : Sub-Join (cont.) Sub-Table Join: - only join column is necessary  reduce read column further  more tuples in main memory  less I/O  operations
Our method : Sub-Join (cont.) Data Call Back - retrieve the data according their key  fully make use of the fast random read
Our method : Sub-Join (cont.) Example Original Table Sub Table Join Table Results Table B_ID B_Join B_Other 1 6 aaaaa… 2 3 aaaaa… 3 3 aaaaa… 4 7 aaaaa… 5 5 aaaaa… 6 8 aaaaa… 7 3 aaaaa… 8 1 aaaaa… A_ID A_Join A_Other 1 6 aaaaa… 2 6 aaaaa… 3 3 aaaaa… 4 10 aaaaa… 5 5 aaaaa… 6 3 aaaaa… A_Join A_ID 3 3 3 6 5 5 6 1 6 2 10 4 B_Join B_ID 1 8 3 2 3 3 3 7 5 5 6 1 7 4 8 6 A_ID B_ID Join 3 2 3 3 3 3 3 7 3 6 2 3 6 3 3 6 7 3 5 5 5 1 1 6 2 1 6 Join Other 3 aaaaa… 3 aaaaa… 3 aaaaa… 3 aaaaa… 3 aaaaa… 3 aaaaa… 5 aaaaa… 6 aaaaa… 6 aaaaa…
Performance Evaluation Setup for Experiment -CPU: Intel Core 2 Pentium 4 Duo CPU 2.83GHz , 2GB RAM -OS: Windows XP sp2 -SSD: Mtron SATA-3035-016, 16GB -Database: Oracle Berkeley DB   Implementation -Index Nested-loop Join -Sub-Join
Performance Evaluation (cont.) Selectivity Selectivity=0.01,Record=2KB Selectivity=0.2,Record=2KB
Performance Evaluation (cont.) Cache size Cache=50MB,Record=2KB Cache=128KB,Record=2KB
Performance Evaluation (cont.) Record size Cache=1MB,Record=2KB Cache=1MB,Record=32KB
Summary We have discussed the defect of the join algorithm adopted in the traditional RDBMS  from the perspective of flash memory We have proposed a novel query optimization algorithm for flash-based database : Sub-Join  Experiments results show that Sub-Join outperforms traditional indexed nested-loop join
Q&A Thank you!
Ad

Recommended

Lecture 42
Lecture 42
RahulRathi94
 
Lecture 41
Lecture 41
RahulRathi94
 
Deterministic Memory Abstraction and Supporting Multicore System Architecture
Deterministic Memory Abstraction and Supporting Multicore System Architecture
Heechul Yun
 
Virtual Memory vs Cache Memory
Virtual Memory vs Cache Memory
Ashik Iqbal
 
Lecture 44
Lecture 44
RahulRathi94
 
Data structures and algorithms 2
Data structures and algorithms 2
Mark John Lado, MIT
 
VIRTUAL MEMORY
VIRTUAL MEMORY
Kamran Ashraf
 
Sucet os module_4_notes
Sucet os module_4_notes
SRINIVASUNIVERSITYEN
 
OSCh10
OSCh10
Joe Christensen
 
Memory management
Memory management
VELAMMAL INSTITUTE OF TECHNOLOGY
 
Ppt cache vs virtual memory without animation
Ppt cache vs virtual memory without animation
animesh jain
 
Accordion HBaseCon 2017
Accordion HBaseCon 2017
Edward Bortnikov
 
Lecture 25
Lecture 25
Shani729
 
Paging and Segmentation in Operating System
Paging and Segmentation in Operating System
Raj Mohan
 
Virtual memory managment
Virtual memory managment
Santu Kumar
 
Memory managment
Memory managment
Shahbaz Khan
 
Database Join
Database Join
Farooq Mian
 
SQL Join Basic
SQL Join Basic
Naimul Arif
 
Relational Algebra,Types of join
Relational Algebra,Types of join
raj upadhyay
 
Database Introduction - Join Query
Database Introduction - Join Query
Dudy Ali
 
Scrum Model
Scrum Model
Farooq Mian
 
joins in database
joins in database
Sultan Arshad
 
Joins in databases
Joins in databases
CourseHunt
 
Database - Normalization
Database - Normalization
Mudasir Qazi
 
Everything about Database JOINS and Relationships
Everything about Database JOINS and Relationships
Abdul Rahman Sherzad
 
SQL
SQL
Galaxyy Pandey
 
Database Normalization
Database Normalization
Ehsan Hamzei
 
Normalization in Database
Normalization in Database
Afrasiyab Haider
 
Normalization of database tables
Normalization of database tables
Dhani Ahmad
 
Types Of Join In Sql Server - Join With Example In Sql Server
Types Of Join In Sql Server - Join With Example In Sql Server
programmings guru
 

More Related Content

What's hot (8)

OSCh10
OSCh10
Joe Christensen
 
Memory management
Memory management
VELAMMAL INSTITUTE OF TECHNOLOGY
 
Ppt cache vs virtual memory without animation
Ppt cache vs virtual memory without animation
animesh jain
 
Accordion HBaseCon 2017
Accordion HBaseCon 2017
Edward Bortnikov
 
Lecture 25
Lecture 25
Shani729
 
Paging and Segmentation in Operating System
Paging and Segmentation in Operating System
Raj Mohan
 
Virtual memory managment
Virtual memory managment
Santu Kumar
 
Memory managment
Memory managment
Shahbaz Khan
 
Ppt cache vs virtual memory without animation
Ppt cache vs virtual memory without animation
animesh jain
 
Lecture 25
Lecture 25
Shani729
 
Paging and Segmentation in Operating System
Paging and Segmentation in Operating System
Raj Mohan
 
Virtual memory managment
Virtual memory managment
Santu Kumar
 

Viewers also liked (19)

Database Join
Database Join
Farooq Mian
 
SQL Join Basic
SQL Join Basic
Naimul Arif
 
Relational Algebra,Types of join
Relational Algebra,Types of join
raj upadhyay
 
Database Introduction - Join Query
Database Introduction - Join Query
Dudy Ali
 
Scrum Model
Scrum Model
Farooq Mian
 
joins in database
joins in database
Sultan Arshad
 
Joins in databases
Joins in databases
CourseHunt
 
Database - Normalization
Database - Normalization
Mudasir Qazi
 
Everything about Database JOINS and Relationships
Everything about Database JOINS and Relationships
Abdul Rahman Sherzad
 
SQL
SQL
Galaxyy Pandey
 
Database Normalization
Database Normalization
Ehsan Hamzei
 
Normalization in Database
Normalization in Database
Afrasiyab Haider
 
Normalization of database tables
Normalization of database tables
Dhani Ahmad
 
Types Of Join In Sql Server - Join With Example In Sql Server
Types Of Join In Sql Server - Join With Example In Sql Server
programmings guru
 
Database Normalization
Database Normalization
Rathan Raj
 
A Join Operator for Property Graphs
A Join Operator for Property Graphs
Giacomo Bergami
 
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Oum Saokosal
 
Normalization of database_tables_chapter_4
Normalization of database_tables_chapter_4
Farhan Chishti
 
Distributed_Database_System
Distributed_Database_System
Philip Zhong
 
Relational Algebra,Types of join
Relational Algebra,Types of join
raj upadhyay
 
Database Introduction - Join Query
Database Introduction - Join Query
Dudy Ali
 
Joins in databases
Joins in databases
CourseHunt
 
Database - Normalization
Database - Normalization
Mudasir Qazi
 
Everything about Database JOINS and Relationships
Everything about Database JOINS and Relationships
Abdul Rahman Sherzad
 
Database Normalization
Database Normalization
Ehsan Hamzei
 
Normalization of database tables
Normalization of database tables
Dhani Ahmad
 
Types Of Join In Sql Server - Join With Example In Sql Server
Types Of Join In Sql Server - Join With Example In Sql Server
programmings guru
 
Database Normalization
Database Normalization
Rathan Raj
 
A Join Operator for Property Graphs
A Join Operator for Property Graphs
Giacomo Bergami
 
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
Oum Saokosal
 
Normalization of database_tables_chapter_4
Normalization of database_tables_chapter_4
Farhan Chishti
 
Distributed_Database_System
Distributed_Database_System
Philip Zhong
 
Ad

Similar to Sub join a query optimization algorithm for flash-based database (20)

Join operation
Join operation
Jeeva Nanthini
 
Relational Algebra Operator With Example
Relational Algebra Operator With Example
exitjogja
 
The PostgreSQL Query Planner
The PostgreSQL Query Planner
Command Prompt., Inc
 
Intro to Table-Grouping™ technology
Intro to Table-Grouping™ technology
David McFarlane
 
MySQL Performance Optimization
MySQL Performance Optimization
Abhijit Mondal
 
Fosdem 2012 practical_indexing
Fosdem 2012 practical_indexing
scombaudon
 
unit-2 Query processing and optimization,Query equivalence, Join strategies.pptx
unit-2 Query processing and optimization,Query equivalence, Join strategies.pptx
RiteshSingh171777
 
Join Operation.pptx
Join Operation.pptx
ComputerScienceDepar6
 
Explain that explain
Explain that explain
Fabrizio Parrella
 
Adbms 38 algorithms for select and join operations
Adbms 38 algorithms for select and join operations
Vaibhav Khanna
 
The Power of MySQL Explain
The Power of MySQL Explain
MYXPLAIN
 
Qicheng yu
Qicheng yu
LondonMet PGR Students
 
Akiban Technologies: Renormalize
Akiban Technologies: Renormalize
Ariel Weil
 
Solving performance problems in MySQL without denormalization
Solving performance problems in MySQL without denormalization
dmcfarlane
 
Akiban Technologies: Renormalize
Akiban Technologies: Renormalize
Ariel Weil
 
Keynote Sap UA Conference March 23 a zeier final
Keynote Sap UA Conference March 23 a zeier final
Prof. Dr. Alexander Zeier
 
MySQL Optimizer Overview
MySQL Optimizer Overview
MYXPLAIN
 
Troubleshooting MySQL Performance add-ons
Troubleshooting MySQL Performance add-ons
Sveta Smirnova
 
A comprehensive study of non blocking joining techniques
A comprehensive study of non blocking joining techniques
IAEME Publication
 
A comprehensive study of non blocking joining technique
A comprehensive study of non blocking joining technique
iaemedu
 
Relational Algebra Operator With Example
Relational Algebra Operator With Example
exitjogja
 
Intro to Table-Grouping™ technology
Intro to Table-Grouping™ technology
David McFarlane
 
MySQL Performance Optimization
MySQL Performance Optimization
Abhijit Mondal
 
Fosdem 2012 practical_indexing
Fosdem 2012 practical_indexing
scombaudon
 
unit-2 Query processing and optimization,Query equivalence, Join strategies.pptx
unit-2 Query processing and optimization,Query equivalence, Join strategies.pptx
RiteshSingh171777
 
Adbms 38 algorithms for select and join operations
Adbms 38 algorithms for select and join operations
Vaibhav Khanna
 
The Power of MySQL Explain
The Power of MySQL Explain
MYXPLAIN
 
Akiban Technologies: Renormalize
Akiban Technologies: Renormalize
Ariel Weil
 
Solving performance problems in MySQL without denormalization
Solving performance problems in MySQL without denormalization
dmcfarlane
 
Akiban Technologies: Renormalize
Akiban Technologies: Renormalize
Ariel Weil
 
Keynote Sap UA Conference March 23 a zeier final
Keynote Sap UA Conference March 23 a zeier final
Prof. Dr. Alexander Zeier
 
MySQL Optimizer Overview
MySQL Optimizer Overview
MYXPLAIN
 
Troubleshooting MySQL Performance add-ons
Troubleshooting MySQL Performance add-ons
Sveta Smirnova
 
A comprehensive study of non blocking joining techniques
A comprehensive study of non blocking joining techniques
IAEME Publication
 
A comprehensive study of non blocking joining technique
A comprehensive study of non blocking joining technique
iaemedu
 
Ad

More from Zhichao Liang (14)

微软Bot framework简介
微软Bot framework简介
Zhichao Liang
 
青云虚拟机部署私有Docker Registry
青云虚拟机部署私有Docker Registry
Zhichao Liang
 
开源Pass平台flynn功能简介
开源Pass平台flynn功能简介
Zhichao Liang
 
青云CoreOS虚拟机部署kubernetes
青云CoreOS虚拟机部署kubernetes
Zhichao Liang
 
Introduction of own cloud
Introduction of own cloud
Zhichao Liang
 
Power drill列存储底层设计
Power drill列存储底层设计
Zhichao Liang
 
C store底层存储设计
C store底层存储设计
Zhichao Liang
 
Storage Class Memory: Technology Overview & System Impacts
Storage Class Memory: Technology Overview & System Impacts
Zhichao Liang
 
A simple introduction to redis
A simple introduction to redis
Zhichao Liang
 
Memcached简介
Memcached简介
Zhichao Liang
 
Some key value stores using log-structure
Some key value stores using log-structure
Zhichao Liang
 
A novel method to extend flash memory lifetime in flash based dbms
A novel method to extend flash memory lifetime in flash based dbms
Zhichao Liang
 
Hush…tell you something novel about flash memory
Hush…tell you something novel about flash memory
Zhichao Liang
 
Survey of distributed storage system
Survey of distributed storage system
Zhichao Liang
 
微软Bot framework简介
微软Bot framework简介
Zhichao Liang
 
青云虚拟机部署私有Docker Registry
青云虚拟机部署私有Docker Registry
Zhichao Liang
 
开源Pass平台flynn功能简介
开源Pass平台flynn功能简介
Zhichao Liang
 
青云CoreOS虚拟机部署kubernetes
青云CoreOS虚拟机部署kubernetes
Zhichao Liang
 
Introduction of own cloud
Introduction of own cloud
Zhichao Liang
 
Power drill列存储底层设计
Power drill列存储底层设计
Zhichao Liang
 
C store底层存储设计
C store底层存储设计
Zhichao Liang
 
Storage Class Memory: Technology Overview & System Impacts
Storage Class Memory: Technology Overview & System Impacts
Zhichao Liang
 
A simple introduction to redis
A simple introduction to redis
Zhichao Liang
 
Some key value stores using log-structure
Some key value stores using log-structure
Zhichao Liang
 
A novel method to extend flash memory lifetime in flash based dbms
A novel method to extend flash memory lifetime in flash based dbms
Zhichao Liang
 
Hush…tell you something novel about flash memory
Hush…tell you something novel about flash memory
Zhichao Liang
 
Survey of distributed storage system
Survey of distributed storage system
Zhichao Liang
 

Recently uploaded (20)

Smarter Aviation Data Management: Lessons from Swedavia Airports and Sweco
Smarter Aviation Data Management: Lessons from Swedavia Airports and Sweco
Safe Software
 
Cyber Defense Matrix Workshop - RSA Conference
Cyber Defense Matrix Workshop - RSA Conference
Priyanka Aash
 
AI vs Human Writing: Can You Tell the Difference?
AI vs Human Writing: Can You Tell the Difference?
Shashi Sathyanarayana, Ph.D
 
OpenACC and Open Hackathons Monthly Highlights June 2025
OpenACC and Open Hackathons Monthly Highlights June 2025
OpenACC
 
Securing Account Lifecycles in the Age of Deepfakes.pptx
Securing Account Lifecycles in the Age of Deepfakes.pptx
FIDO Alliance
 
Crypto Super 500 - 14th Report - June2025.pdf
Crypto Super 500 - 14th Report - June2025.pdf
Stephen Perrenod
 
Turning the Page – How AI is Exponentially Increasing Speed, Accuracy, and Ef...
Turning the Page – How AI is Exponentially Increasing Speed, Accuracy, and Ef...
Impelsys Inc.
 
Creating Inclusive Digital Learning with AI: A Smarter, Fairer Future
Creating Inclusive Digital Learning with AI: A Smarter, Fairer Future
Impelsys Inc.
 
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
Muhammad Rizwan Akram
 
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Puppy jhon
 
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Alliance
 
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Nilesh Gule
 
“Key Requirements to Successfully Implement Generative AI in Edge Devices—Opt...
“Key Requirements to Successfully Implement Generative AI in Edge Devices—Opt...
Edge AI and Vision Alliance
 
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
biswajitbanerjee38
 
Tech-ASan: Two-stage check for Address Sanitizer - Yixuan Cao.pdf
Tech-ASan: Two-stage check for Address Sanitizer - Yixuan Cao.pdf
caoyixuan2019
 
June Patch Tuesday
June Patch Tuesday
Ivanti
 
“From Enterprise to Makers: Driving Vision AI Innovation at the Extreme Edge,...
“From Enterprise to Makers: Driving Vision AI Innovation at the Extreme Edge,...
Edge AI and Vision Alliance
 
MuleSoft for AgentForce : Topic Center and API Catalog
MuleSoft for AgentForce : Topic Center and API Catalog
shyamraj55
 
ReSTIR [DI]: Spatiotemporal reservoir resampling for real-time ray tracing ...
ReSTIR [DI]: Spatiotemporal reservoir resampling for real-time ray tracing ...
revolcs10
 
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Alliance
 
Smarter Aviation Data Management: Lessons from Swedavia Airports and Sweco
Smarter Aviation Data Management: Lessons from Swedavia Airports and Sweco
Safe Software
 
Cyber Defense Matrix Workshop - RSA Conference
Cyber Defense Matrix Workshop - RSA Conference
Priyanka Aash
 
AI vs Human Writing: Can You Tell the Difference?
AI vs Human Writing: Can You Tell the Difference?
Shashi Sathyanarayana, Ph.D
 
OpenACC and Open Hackathons Monthly Highlights June 2025
OpenACC and Open Hackathons Monthly Highlights June 2025
OpenACC
 
Securing Account Lifecycles in the Age of Deepfakes.pptx
Securing Account Lifecycles in the Age of Deepfakes.pptx
FIDO Alliance
 
Crypto Super 500 - 14th Report - June2025.pdf
Crypto Super 500 - 14th Report - June2025.pdf
Stephen Perrenod
 
Turning the Page – How AI is Exponentially Increasing Speed, Accuracy, and Ef...
Turning the Page – How AI is Exponentially Increasing Speed, Accuracy, and Ef...
Impelsys Inc.
 
Creating Inclusive Digital Learning with AI: A Smarter, Fairer Future
Creating Inclusive Digital Learning with AI: A Smarter, Fairer Future
Impelsys Inc.
 
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
Muhammad Rizwan Akram
 
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Puppy jhon
 
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Alliance
 
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Nilesh Gule
 
“Key Requirements to Successfully Implement Generative AI in Edge Devices—Opt...
“Key Requirements to Successfully Implement Generative AI in Edge Devices—Opt...
Edge AI and Vision Alliance
 
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
biswajitbanerjee38
 
Tech-ASan: Two-stage check for Address Sanitizer - Yixuan Cao.pdf
Tech-ASan: Two-stage check for Address Sanitizer - Yixuan Cao.pdf
caoyixuan2019
 
June Patch Tuesday
June Patch Tuesday
Ivanti
 
“From Enterprise to Makers: Driving Vision AI Innovation at the Extreme Edge,...
“From Enterprise to Makers: Driving Vision AI Innovation at the Extreme Edge,...
Edge AI and Vision Alliance
 
MuleSoft for AgentForce : Topic Center and API Catalog
MuleSoft for AgentForce : Topic Center and API Catalog
shyamraj55
 
ReSTIR [DI]: Spatiotemporal reservoir resampling for real-time ray tracing ...
ReSTIR [DI]: Spatiotemporal reservoir resampling for real-time ray tracing ...
revolcs10
 
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Alliance
 

Sub join a query optimization algorithm for flash-based database

  • 1. Sub-Join: A Query Optimization Algorithm for Flash-based Database Zhichao Liang, Da Zhou, Xiaofeng Meng 2009-10-11
  • 2. Outline Background Motivation Related works Our method : Sub-Join Performance Evaluation Summary
  • 3. Two important characteristics of flash memory - faster data access (random read) - worse random write Background Read Write Erase Time 25 200 1.5
  • 4. Motivation Read& Write Throughput (Mb/s) Time of join for Oracle Berkeley DB (s) HDD SSD Ratio Random Read 3.80 70.76 18.62 Sequential Read 37.45 73.08 1.95 Random Write 3.73 3.71 0.99 Sequential Write 37.69 68.52 1.82 HDD SSD Ratio Time 2.71 1.96 1.38
  • 5. Motivation (cont.) Flash offers little or no benefit when used as a simple drop-in replacement for disk Traditional query processing algorithms for data analysis are tuned for disks They avoid random I/O operations but exploit sequential I/O operations whenever possible So, they fail to take advantage of the fast random reads of flash drives
  • 6. Related works PAX Layout & RARE-join by Mehul A. Shah Fast scans and joins using flash drives [C]// Luo Q, Ross K A. Proceedings of 4th Workshop on Data Management on New Hardware. New York: ACM Press, 2008: 17-24. Subset by Daniel Myers MIT CSAIL Research Abstracts [EB/OL].2007[2009-7-19] On the Use of NAND Flash Memory in High-Performance Relational Databases[D]. Massachusetts:MIT,2008. DigestJoin by Yu Li DigestJoin: Exploiting Fast Random Reads for Flash-based Joins [C]// Lee W C, King C T, Pitoura E. Proceedings of the 10th International Conference on Mobile Data Management. TaiPei: IEEE Computer Society Press, 2009: 152-161.
  • 7. Our method : Sub-Join The Framework of Sub-Join Algorithm Sub-Table Construct Sub-Table Join Data Call Back
  • 8. Our method : Sub-Join (cont.) Sub-Table Construct: - less data volume to read lower read cost - more tuples in main memory less I/O operations Column-Stores in Sub-Table - avoid random write lower write cost - sequential read faster data access A_ID A_Join
  • 9. Our method : Sub-Join (cont.) Sub-Table Join: - only join column is necessary reduce read column further more tuples in main memory less I/O operations
  • 10. Our method : Sub-Join (cont.) Data Call Back - retrieve the data according their key fully make use of the fast random read
  • 11. Our method : Sub-Join (cont.) Example Original Table Sub Table Join Table Results Table B_ID B_Join B_Other 1 6 aaaaa… 2 3 aaaaa… 3 3 aaaaa… 4 7 aaaaa… 5 5 aaaaa… 6 8 aaaaa… 7 3 aaaaa… 8 1 aaaaa… A_ID A_Join A_Other 1 6 aaaaa… 2 6 aaaaa… 3 3 aaaaa… 4 10 aaaaa… 5 5 aaaaa… 6 3 aaaaa… A_Join A_ID 3 3 3 6 5 5 6 1 6 2 10 4 B_Join B_ID 1 8 3 2 3 3 3 7 5 5 6 1 7 4 8 6 A_ID B_ID Join 3 2 3 3 3 3 3 7 3 6 2 3 6 3 3 6 7 3 5 5 5 1 1 6 2 1 6 Join Other 3 aaaaa… 3 aaaaa… 3 aaaaa… 3 aaaaa… 3 aaaaa… 3 aaaaa… 5 aaaaa… 6 aaaaa… 6 aaaaa…
  • 12. Performance Evaluation Setup for Experiment -CPU: Intel Core 2 Pentium 4 Duo CPU 2.83GHz , 2GB RAM -OS: Windows XP sp2 -SSD: Mtron SATA-3035-016, 16GB -Database: Oracle Berkeley DB Implementation -Index Nested-loop Join -Sub-Join
  • 13. Performance Evaluation (cont.) Selectivity Selectivity=0.01,Record=2KB Selectivity=0.2,Record=2KB
  • 14. Performance Evaluation (cont.) Cache size Cache=50MB,Record=2KB Cache=128KB,Record=2KB
  • 15. Performance Evaluation (cont.) Record size Cache=1MB,Record=2KB Cache=1MB,Record=32KB
  • 16. Summary We have discussed the defect of the join algorithm adopted in the traditional RDBMS from the perspective of flash memory We have proposed a novel query optimization algorithm for flash-based database : Sub-Join Experiments results show that Sub-Join outperforms traditional indexed nested-loop join

Editor's Notes

  • #7: Mehul A. Shah 提出一种按列存储 (PAX Layout)[3] 的方式来提高连接的速度。传统的数据库主要采用行存储模式,即数据表根据元组按照行的方式进行存储。采用按列存储的方式,查询时只需要扫描进行连接操作的列,从而有效地减少了读入的数据量。虽然这个过程中需要比按行存储执行更多的随机读取操作,但是由于固态硬盘具有高速的随机读取速度,所以 PAX Layout 方法能够有效地提高在连接过程中对表的扫描速度。 Mehul A. Shah 同样提出一种 RARE-join (RAndom Read Efficient Join) 的连接算法。 RARE-join 首先对连接列构建索引,然后根据索引连接的结果去原表中读取数据,其中只与结果相关的列和行才被读取出来,从而有效地减少读取的数据。 RARE-join 充分利用了固态硬盘的随机读取性能提高了查询的性能。 Daniel Myers 提出采用 subset[4, 5] 的方法来提高查询中的外排序性能。传统的外排序算法将元组读入内存后进行排序,然后将排序后的所有元组的所有列全部写入存储设备。这个过程中非连接列的数据也会被多次写入到存储设备中。 Daniel Myers 针对固态硬盘的特性在外排序的中间结果写出上进行优化,只将连接列的数据写入到存储设备,从而有效地减少数据的写操作。在排序结束后,再从原始表中获取其它数据,完成最初的排序过程。在从原始表中获取其它数据时,需要进行大量的随机读,这刚好是固态硬盘的最大优点之一。 Daniel Myers 充分利用了固态硬盘的高速读性能和避免其低下的写性能,从而提高了外连接的效率。 在 Daniel Myers 的基础上, Yu Li 提出针对固态硬盘特点而优化的 DigestJoin 查询优化算法 [6] 。 DigestJoin 首先将两个进行查询连接的表进行抽取,获取连接列的 Digest 表,然后对 Digest 表进行嵌套循环连接。在得到连接结果后,采取基于查询图 (Join Graph) 的方法来读入连接查询中位于原始表的数据。基于查询图的方法能够有效地减少数据页的重复读,从而减少读的次数。此外, DigestJoin 采取页载入 (Page Loading) 方式来读入原始表的数据。页载入的方法在读取数据时同时将位于同一页的其它数据也读入内存。如果接下来刚好需要这些数据的话,就可以减少读入次数,从而有效地提高查询的效率。