Session – 9 QUERY OPTIMATIZATION Matakuliah: M0184 / Pengolahan Data Distribusi Tahun: 2005 Versi:

Slides:



Advertisements
Similar presentations
Integrated Healthcare Management system. Standards based design. [ Supports HXP (Health Exchange Protocol) a standard in exchanging health care data ]
Advertisements

Query optimisation.
Performance Tuning Compiled from: Oracle Database Administration, Session 13, Performance, Harvard U Oracle Server Tuning Accelerator, David Scott, Intec.
Transmitting & Receiving Contents  Hardware for Transmitting & Receiving:By Ryan Caulfield  Software for Transmitting & Receiving: By Todd John  Non-Computer.
Query Optimization Reserves Sailors sid=sid bid=100 rating > 5 sname (Simple Nested Loops) Imperative query execution plan: SELECT S.sname FROM Reserves.
Distributed DBMSPage © 1998 M. Tamer Özsu & Patrick Valduriez Outline Introduction Background Distributed DBMS Architecture Distributed Database.
Distributed DBMSPage © 1998 M. Tamer Özsu & Patrick Valduriez Outline Introduction Background Distributed DBMS Architecture Distributed Database.
Distributed DBMS© M. T. Özsu & P. Valduriez Ch.6/1 Outline Introduction Background Distributed Database Design Database Integration Semantic Data Control.
Developed by Tony Connell Learning and Development Consultant and the East Midlands Health Trainer Hub, hosted by NHS Derbyshire County Making Every Contact.
Advanced Database Systems September 2013 Dr. Fatemeh Ahmadi-Abkenari 1.
Selectivity-Based Partitioning Alkis Polyzotis UC Santa Cruz.
Reference: Message Passing Fundamentals.
Chapter 14 An Overview of Query Optimization. Copyright © 2005 Pearson Addison-Wesley. All rights reserved Figure 14.1 Typical architecture for.
Session – 8 DATA HANDLING – DISTRIBUTION AND TRANSFORMATION
1 Minggu 12, Pertemuan 23 Introduction to Distributed DBMS (Chapter , 22.6, 3rd ed.) Matakuliah: T0206-Sistem Basisdata Tahun: 2005 Versi: 1.0/0.0.
Session – 6 DISTRIBUTED DATABASE ARCHITECTURE Matakuliah: M0184 / Pengolahan Data Distribusi Tahun: 2005 Versi:
CS263 Lecture 19 Query Optimisation.  Motivation for Query Optimisation  Phases of Query Processing  Query Trees  RA Transformation Rules  Heuristic.
Session - 21 DISTRIBUTED DATABASE DESIGN AND ADMINISTRATION DISTRIBUTED DATABASE DESIGN Matakuliah: M0184 / Pengolahan Data Distribusi Tahun: 2005 Versi:
Session - 22 DISTRIBUTED DATABASE DESIGN AND ADMINISTRATION DISTRIBUTED DATABASE ADMINISTRATION Matakuliah: M0184 / Pengolahan Data Distribusi Tahun: 2005.
Session – 10 QUERY OPTIMIZATION Matakuliah: M0184 / Pengolahan Data Distribusi Tahun: 2005 Versi:
Multiprocessors ELEC 6200: Computer Architecture and Design Instructor : Agrawal Name: Nam.
1 Distributed Databases CS347 Lecture 14 May 30, 2001.
Session - 15 RECOVERY CONTROL - 1 Matakuliah: M0184 / Pengolahan Data Distribusi Tahun: 2005 Versi:
Parallel Algorithms for Relational Operations. Models of Parallelism There is a collection of processors. –Often the number of processors p is large,
Session - 25 MULTIDATABASE CASE Electronic Health Matakuliah: M0184 / Pengolahan Data Distribusi Tahun: 2005 Versi:
Session - 14 CONCURRENCY CONTROL CONCURRENCY TECHNIQUES Matakuliah: M0184 / Pengolahan Data Distribusi Tahun: 2005 Versi:
CS 347Notes 041 CS 347: Distributed Databases and Transaction Processing Notes04: Query Optimization Hector Garcia-Molina.
Session - 18 RECOVERY CONTROL - 2 Matakuliah: M0184 / Pengolahan Data Distribusi Tahun: 2005 Versi:
Session – 5 DISTRIBUTED DATABASE ARCHITECTURE Matakuliah: M0184 / Pengolahan Data Distribusi Tahun: 2005 Versi:
Session - 26 MULTIDATABASE CASE Electronic Health Matakuliah: M0184 / Pengolahan Data Distribusi Tahun: 2005 Versi:
Session - 20 INTEGRATY AND SECURITY SECURITY Matakuliah: M0184 / Pengolahan Data Distribusi Tahun: 2005 Versi:
Distributed Databases and Query Processing. Distributed DB’s vs. Parallel DB’s Many autonomous processors that may participate in database operations.
Session – 7 DATA HANDLING – DISTRIBUTION AND TRANSFORMATION Matakuliah: M0184 / Pengolahan Data Distribusi Tahun: 2005 Versi:
1 Optimizing Utility in Cloud Computing through Autonomic Workload Execution Reporter : Lin Kelly Date : 2010/11/24.
Parallel and Distributed IR
Session - 24 FUTURE DEVELOPMENT IN DISTRIBUTED DATABASE DISTRIBUTED EXPERT SYSTEM Matakuliah: M0184 / Pengolahan Data Distribusi Tahun: 2005 Versi:
Query Processing Presented by Aung S. Win.
Improved partnership working in winter Acute and Community Hospitals, Community Health Partnerships and Local Management Units Alasdair Macleod.
DBS201: DBA/DBMS Lecture 13.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 10 Database Performance Tuning and Query Optimization.
Software Engineering Chapter 23 Software Testing Ku-Yaw Chang Assistant Professor Department of Computer Science and Information.
1 A Bayesian Method for Guessing the Extreme Values in a Data Set Mingxi Wu, Chris Jermaine University of Florida September 2007.
Query Optimization. overview Histograms A histogram is a data structure maintained by a DBMS to approximate a data distribution Equiwidth vs equidepth.
Database Management 9. course. Execution of queries.
Query Optimization. Query Optimization Query Optimization The execution cost is expressed as weighted combination of I/O, CPU and communication cost.
Academic Year 2014 Spring. MODULE CC3005NI: Advanced Database Systems “QUERY OPTIMIZATION” Academic Year 2014 Spring.
Distributed Database Systems Overview
PMIT-6102 Advanced Database Systems By- Jesmin Akhter Assistant Professor, IIT, Jahangirnagar University.
Switch off your Mobiles Phones or Change Profile to Silent Mode.
EEL 5937 Agent models. EEL 5937 Multi Agent Systems Lecture 4, Jan 16, 2003 Lotzi Bölöni.
DDBMS Distributed Database Management Systems Fragmentation
Databases Illuminated
Database Environment Chapter 2. Data Independence Sometimes the way data are physically organized depends on the requirements of the application. Result:
Lecture 15- Parallel Databases (continued) Advanced Databases Masood Niazi Torshiz Islamic Azad University- Mashhad Branch
Chapter 5 Ranking with Indexes 1. 2 More Indexing Techniques n Indexing techniques:  Inverted files - best choice for most applications  Suffix trees.
Query Processing in Connectivity- Challenged Environments Priyanka Puri Sharma Chakravarthy Gururaj Poornima Mohan Kumar Information Technology Laboratory.
Session – 11 CONCURRENCY CONTROL USER ACCESS CONTROL Matakuliah: M0184 / Pengolahan Data Distribusi Tahun: 2005 Versi:
Software Engineering Prof. Dr. Bertrand Meyer March 2007 – June 2007 Chair of Software Engineering Lecture #20: Profiling NetBeans Profiler 6.0.
Lecture 15: Query Optimization. Very Big Picture Usually, there are many possible query execution plans. The optimizer is trying to chose a good one.
Chapter 13 Query Optimization Yonsei University 1 st Semester, 2015 Sanghyun Park.
Query Processing and Optimization Muheet Ahmed Butt.
1 Minggu 6, Pertemuan 12 Query Processing Matakuliah: T0206-Sistem Basisdata Tahun: 2005 Versi: 1.0/0.0.
Topics in Distributed Databases Database System Implementation CSE 507 Some slides adapted from Navathe et. Al and Silberchatz et. Al.
CS742 – Distributed & Parallel DBMSPage 3. 1M. Tamer Özsu Outline Introduction & architectural issues Data distribution  Distributed query processing.
Session – 4 DISTRIBUTED DATABASE AND COMPUTER NETWORK
Database System Implementation CSE 507
Chapter 15 QUERY EXECUTION.
Mapping the Data Warehouse to a Multiprocessor Architecture
Outline Introduction Background Distributed DBMS Architecture
Distributed Database Management Systems
Presentation transcript:

Session – 9 QUERY OPTIMATIZATION Matakuliah: M0184 / Pengolahan Data Distribusi Tahun: 2005 Versi:

OBJECTIVE Definition of Query optimization Query Optimization Process Essential aspects of query processing in a distributed environment The importance of query optimization

Query Optimization Query optimization refers to the process of producing a query execution plan (QEP) which represent an execution strategy for the query. Query optimization is the process of ensuring that either total cost or the total response time for a query are minimized. A query optimizer, the software module that perform query optimization, is usually seen as three components : search space, a cost model and search strategy

Query Optimization Process SEARCH SPACE GENERATION SEARCH STRATEGY INPUT QUERY EQUIVALENT QEP BEST QEP COST MODEL TRANSFORMATION RULES Source : Principle of Distributed Database System

Query Optimization Process Cont’d SEARCH SPACE, is the set of alternative execution plans to represent the input query. Search Space is obtained by applying transformation rules. COST MODEL predicts the cost of a given execution plan. To be accurate the cost model must have good knowledge about the distributed execution environment The SEARCH STRATEGY explores the search space and select the best plan using the cost model

Essential Aspect of Query Processing in a Distributed environment Data and message have to be transmitted across communications lines, which has a tendency to slow down the whole process The existence of multiple processor in the network means that there are opportunities for parallel processing and data transformation, which raises the possibility of speeding up responses.

The importance of Query Optimization There can be very substantial savings in the cost of execution a query or in the length of time the user has to wait for a response. Execution cost optimizer is to minimize the use of total system resources for a query and hence reduce its cost. Response time can be taken to represent a cost to an organization

Variation in Ways of Executing Queries Two basic tools for use in optimization : 1.Query Transformation, the relational operator such as JOIN and PROJECT 2.Query Mapping, execution relational operator using low-level algorithms and access devices such as pointer.

EXAMPLE SITERELATION HospitalHOSPITALIZATION (Pat-Name, DOB, admit, Discharge, Dept) Cardinality : Health CenterPATIENT (Pat-Name, DOB, GP) Cardinality : Community Care SURVEY (Pat-Name, DOB, Weight, Type-of- work) Cardinality :

EXAMPLE Cont’d Query : Find the names and GP all patients who weight over 100Kg and have been treated in the orthopedic department since 1 January 2005.

EXAMPLE – OPTION 1 Move PATIENT relation to Community Care, JOIN it with SURVEY relation and move the result to the query site for joining with the other relation, shipped from the Hospital t : cost for transmitting a tuple c : overall cost Cost : (10000 * 1000c)  for PATIENT and restricted SURVEY (assume 1000 tuple result) + (200 * 1000c)  for joining this result and restricted HOSPITALIZATION Transmit : 200t t t

EXAMPLE – OPTION 1 Send the restricted HOSPITALIZATION relation to Community Care, Join it with Restricted SURVE. Join the result with PATIENT. Cost : 1000 * 200c  Community Care * 10000c  Health Care Transmit : 200t + 100t t