SlideShare a Scribd company logo
1 of 5
Optimizing Distributed
Queries
© Rinku Upadhaya Acharaya
BCIS 7th
© Rinku Upadhaya Acharaya 6/2/2014
What is Query optimization?
Query optimization is a function of many relational database
management systems
The query optimizer is the component of a database management system
that attempts to determine the most efficient way to execute a query by
considering the possible query plans.
© Rinku Upadhaya Acharaya 6/2/2014
Centralized query optimization:
– Find (the best) query execution plan in the space of equivalent query trees
– Minimize an objective cost function
– Gather statistics about relations
Distributed query optimization brings additional issues
– Linear query trees are not necessarily a good choice
– Bushy query trees are not necessarily a bad choice
–What and where to ship the relations
– How to ship relations (ship as a whole, ship as needed)
© Rinku Upadhaya Acharaya 6/2/2014
Search space:
–The set of alternative query execution plans (query trees)
–Typically very large
–The main issue is to optimize the joins
– For N relations, there are O(N !) equivalent join trees that can be obtained by
applying commutatively and associativity rules
© Rinku Upadhaya Acharaya 6/2/2014
Distributed Cost Model
Two different types of cost functions can be used
– Reduce total time
∗ Reduce each cost component (in terms of time) individually, i.e., do as little
for each cost component as possible
∗ Optimize the utilization of the resources (i.e., increase system throughput)
– Reduce response time
∗ Do as many things in parallel as possible
∗ May increase total time because of increased total activity
© Rinku Upadhaya Acharaya 6/2/2014

More Related Content

What's hot

Replication in Distributed Database
Replication in Distributed DatabaseReplication in Distributed Database
Replication in Distributed DatabaseAbhilasha Lahigude
 
Study on Theoretical Aspects of Virtual Data Integration and its Applications
Study on Theoretical Aspects of Virtual Data Integration and its ApplicationsStudy on Theoretical Aspects of Virtual Data Integration and its Applications
Study on Theoretical Aspects of Virtual Data Integration and its ApplicationsIJERA Editor
 
When & Why\'s of Denormalization
When & Why\'s of DenormalizationWhen & Why\'s of Denormalization
When & Why\'s of DenormalizationAliya Saldanha
 
Advance database systems (part 1)
Advance database systems (part 1)Advance database systems (part 1)
Advance database systems (part 1)Abdullah Khosa
 
Advance database system(part 4)
Advance database system(part 4)Advance database system(part 4)
Advance database system(part 4)Abdullah Khosa
 
Dwh lecture-07-denormalization
Dwh lecture-07-denormalizationDwh lecture-07-denormalization
Dwh lecture-07-denormalizationSulman Ahmed
 
Database , 5 Semantic
Database , 5 SemanticDatabase , 5 Semantic
Database , 5 SemanticAli Usman
 
Physical Database Design & Performance
Physical Database Design & PerformancePhysical Database Design & Performance
Physical Database Design & PerformanceAbdullah Khosa
 
Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)IJERD Editor
 
Cost aware cooperative resource provisioning
Cost aware cooperative resource provisioningCost aware cooperative resource provisioning
Cost aware cooperative resource provisioningIMPULSE_TECHNOLOGY
 
Database Management Systems
Database Management SystemsDatabase Management Systems
Database Management SystemsSURBHI SAROHA
 
1.4 data independence
1.4 data independence1.4 data independence
1.4 data independenceBHARATH KUMAR
 
Adbms 6 three schema database architecture
Adbms 6 three schema database architectureAdbms 6 three schema database architecture
Adbms 6 three schema database architectureVaibhav Khanna
 
Relational database design
Relational database designRelational database design
Relational database designSURBHI SAROHA
 
A unified approach for spatial data query
A unified approach for spatial data queryA unified approach for spatial data query
A unified approach for spatial data queryIJDKP
 
Physical database design(database)
Physical database design(database)Physical database design(database)
Physical database design(database)welcometofacebook
 

What's hot (20)

H04564550
H04564550H04564550
H04564550
 
Replication in Distributed Database
Replication in Distributed DatabaseReplication in Distributed Database
Replication in Distributed Database
 
Study on Theoretical Aspects of Virtual Data Integration and its Applications
Study on Theoretical Aspects of Virtual Data Integration and its ApplicationsStudy on Theoretical Aspects of Virtual Data Integration and its Applications
Study on Theoretical Aspects of Virtual Data Integration and its Applications
 
When & Why\'s of Denormalization
When & Why\'s of DenormalizationWhen & Why\'s of Denormalization
When & Why\'s of Denormalization
 
Advance database systems (part 1)
Advance database systems (part 1)Advance database systems (part 1)
Advance database systems (part 1)
 
Advance database system(part 4)
Advance database system(part 4)Advance database system(part 4)
Advance database system(part 4)
 
Denormalization
DenormalizationDenormalization
Denormalization
 
Dwh lecture-07-denormalization
Dwh lecture-07-denormalizationDwh lecture-07-denormalization
Dwh lecture-07-denormalization
 
Databse management system
Databse management systemDatabse management system
Databse management system
 
Database , 5 Semantic
Database , 5 SemanticDatabase , 5 Semantic
Database , 5 Semantic
 
Physical Database Design & Performance
Physical Database Design & PerformancePhysical Database Design & Performance
Physical Database Design & Performance
 
Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)
 
Hierarchical Denormalization
Hierarchical DenormalizationHierarchical Denormalization
Hierarchical Denormalization
 
Cost aware cooperative resource provisioning
Cost aware cooperative resource provisioningCost aware cooperative resource provisioning
Cost aware cooperative resource provisioning
 
Database Management Systems
Database Management SystemsDatabase Management Systems
Database Management Systems
 
1.4 data independence
1.4 data independence1.4 data independence
1.4 data independence
 
Adbms 6 three schema database architecture
Adbms 6 three schema database architectureAdbms 6 three schema database architecture
Adbms 6 three schema database architecture
 
Relational database design
Relational database designRelational database design
Relational database design
 
A unified approach for spatial data query
A unified approach for spatial data queryA unified approach for spatial data query
A unified approach for spatial data query
 
Physical database design(database)
Physical database design(database)Physical database design(database)
Physical database design(database)
 

Similar to Optimizing distributed queries

A Survey on Automatically Mining Facets for Queries from their Search Results
A Survey on Automatically Mining Facets for Queries from their Search ResultsA Survey on Automatically Mining Facets for Queries from their Search Results
A Survey on Automatically Mining Facets for Queries from their Search ResultsIRJET Journal
 
Query-Based Retrieval of Annotated Document
Query-Based Retrieval of Annotated DocumentQuery-Based Retrieval of Annotated Document
Query-Based Retrieval of Annotated DocumentIRJET Journal
 
Enabling Better Clinical Operations through a Clinical Operations Store
Enabling Better Clinical Operations through a Clinical Operations StoreEnabling Better Clinical Operations through a Clinical Operations Store
Enabling Better Clinical Operations through a Clinical Operations StoreSaama
 
Importance of solution architecture
Importance of solution architectureImportance of solution architecture
Importance of solution architectureCristina Vidu
 
3 Enterprise Storage Assessment
3 Enterprise Storage Assessment3 Enterprise Storage Assessment
3 Enterprise Storage AssessmentJeremiah Loscalzo
 
Edgewater Sim Boston 2016
Edgewater Sim Boston 2016Edgewater Sim Boston 2016
Edgewater Sim Boston 2016Edgewater
 
IRJET- An Integrated Recommendation System using Graph Database and QGIS
IRJET-  	  An Integrated Recommendation System using Graph Database and QGISIRJET-  	  An Integrated Recommendation System using Graph Database and QGIS
IRJET- An Integrated Recommendation System using Graph Database and QGISIRJET Journal
 
0903 pacific gas and electric companys bpc projects
0903 pacific gas and electric companys bpc projects0903 pacific gas and electric companys bpc projects
0903 pacific gas and electric companys bpc projectsSilas Musakali
 
SharePoint User Group Meeting- SharePoint 2013 Search
SharePoint User Group Meeting- SharePoint 2013 SearchSharePoint User Group Meeting- SharePoint 2013 Search
SharePoint User Group Meeting- SharePoint 2013 SearchC/D/H Technology Consultants
 
Semantic web service
Semantic web serviceSemantic web service
Semantic web servicejean Agnimel
 
Debate Initial Post and Response Rubric Student Name .docx
Debate Initial Post and Response Rubric Student Name     .docxDebate Initial Post and Response Rubric Student Name     .docx
Debate Initial Post and Response Rubric Student Name .docxsimonithomas47935
 
Agile Strategic Facilities Plan
Agile Strategic Facilities PlanAgile Strategic Facilities Plan
Agile Strategic Facilities PlanRobert Lambe, CFM
 
Methodology - Conceptual Database Design Transparencies .pptx
Methodology -  Conceptual Database Design Transparencies .pptxMethodology -  Conceptual Database Design Transparencies .pptx
Methodology - Conceptual Database Design Transparencies .pptxbirhanugirmay559
 
Database System Development Life Cycle ( DDLC )
Database System Development Life Cycle ( DDLC )Database System Development Life Cycle ( DDLC )
Database System Development Life Cycle ( DDLC )sankalpkumarsahoo174
 
Query optimization and challenges in DDBMS with Review Algorithms.
Query optimization and challenges in DDBMS with Review Algorithms.Query optimization and challenges in DDBMS with Review Algorithms.
Query optimization and challenges in DDBMS with Review Algorithms.Beingprp
 

Similar to Optimizing distributed queries (20)

A Survey on Automatically Mining Facets for Queries from their Search Results
A Survey on Automatically Mining Facets for Queries from their Search ResultsA Survey on Automatically Mining Facets for Queries from their Search Results
A Survey on Automatically Mining Facets for Queries from their Search Results
 
Query-Based Retrieval of Annotated Document
Query-Based Retrieval of Annotated DocumentQuery-Based Retrieval of Annotated Document
Query-Based Retrieval of Annotated Document
 
Enabling Better Clinical Operations through a Clinical Operations Store
Enabling Better Clinical Operations through a Clinical Operations StoreEnabling Better Clinical Operations through a Clinical Operations Store
Enabling Better Clinical Operations through a Clinical Operations Store
 
Data Management Strategy
Data Management StrategyData Management Strategy
Data Management Strategy
 
Importance of solution architecture
Importance of solution architectureImportance of solution architecture
Importance of solution architecture
 
3 Enterprise Storage Assessment
3 Enterprise Storage Assessment3 Enterprise Storage Assessment
3 Enterprise Storage Assessment
 
Edgewater Sim Boston 2016
Edgewater Sim Boston 2016Edgewater Sim Boston 2016
Edgewater Sim Boston 2016
 
IRJET- An Integrated Recommendation System using Graph Database and QGIS
IRJET-  	  An Integrated Recommendation System using Graph Database and QGISIRJET-  	  An Integrated Recommendation System using Graph Database and QGIS
IRJET- An Integrated Recommendation System using Graph Database and QGIS
 
0903 pacific gas and electric companys bpc projects
0903 pacific gas and electric companys bpc projects0903 pacific gas and electric companys bpc projects
0903 pacific gas and electric companys bpc projects
 
SharePoint User Group Meeting- SharePoint 2013 Search
SharePoint User Group Meeting- SharePoint 2013 SearchSharePoint User Group Meeting- SharePoint 2013 Search
SharePoint User Group Meeting- SharePoint 2013 Search
 
Semantic web service
Semantic web serviceSemantic web service
Semantic web service
 
Apnic-irme
Apnic-irmeApnic-irme
Apnic-irme
 
Debate Initial Post and Response Rubric Student Name .docx
Debate Initial Post and Response Rubric Student Name     .docxDebate Initial Post and Response Rubric Student Name     .docx
Debate Initial Post and Response Rubric Student Name .docx
 
Agile Strategic Facilities Plan
Agile Strategic Facilities PlanAgile Strategic Facilities Plan
Agile Strategic Facilities Plan
 
6 Service Catalog Design
6 Service Catalog Design6 Service Catalog Design
6 Service Catalog Design
 
Methodology - Conceptual Database Design Transparencies .pptx
Methodology -  Conceptual Database Design Transparencies .pptxMethodology -  Conceptual Database Design Transparencies .pptx
Methodology - Conceptual Database Design Transparencies .pptx
 
Ch 6.pdf
Ch 6.pdfCh 6.pdf
Ch 6.pdf
 
Advanced Database System
Advanced Database SystemAdvanced Database System
Advanced Database System
 
Database System Development Life Cycle ( DDLC )
Database System Development Life Cycle ( DDLC )Database System Development Life Cycle ( DDLC )
Database System Development Life Cycle ( DDLC )
 
Query optimization and challenges in DDBMS with Review Algorithms.
Query optimization and challenges in DDBMS with Review Algorithms.Query optimization and challenges in DDBMS with Review Algorithms.
Query optimization and challenges in DDBMS with Review Algorithms.
 

Recently uploaded

Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxcallscotland1987
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxAmanpreet Kaur
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 

Recently uploaded (20)

Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 

Optimizing distributed queries

  • 1. Optimizing Distributed Queries © Rinku Upadhaya Acharaya BCIS 7th © Rinku Upadhaya Acharaya 6/2/2014
  • 2. What is Query optimization? Query optimization is a function of many relational database management systems The query optimizer is the component of a database management system that attempts to determine the most efficient way to execute a query by considering the possible query plans. © Rinku Upadhaya Acharaya 6/2/2014
  • 3. Centralized query optimization: – Find (the best) query execution plan in the space of equivalent query trees – Minimize an objective cost function – Gather statistics about relations Distributed query optimization brings additional issues – Linear query trees are not necessarily a good choice – Bushy query trees are not necessarily a bad choice –What and where to ship the relations – How to ship relations (ship as a whole, ship as needed) © Rinku Upadhaya Acharaya 6/2/2014
  • 4. Search space: –The set of alternative query execution plans (query trees) –Typically very large –The main issue is to optimize the joins – For N relations, there are O(N !) equivalent join trees that can be obtained by applying commutatively and associativity rules © Rinku Upadhaya Acharaya 6/2/2014
  • 5. Distributed Cost Model Two different types of cost functions can be used – Reduce total time ∗ Reduce each cost component (in terms of time) individually, i.e., do as little for each cost component as possible ∗ Optimize the utilization of the resources (i.e., increase system throughput) – Reduce response time ∗ Do as many things in parallel as possible ∗ May increase total time because of increased total activity © Rinku Upadhaya Acharaya 6/2/2014