QueryOpt - Outline Introduction Distributed DBMS...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
Distributed & Parallel DBMS Page 4. 42 M. Tamer Özsu Outline ± Introduction ± Distributed DBMS Architecture ± Distributed Database Design ² Distributed Query Processing ² Query Processing Methodology ² Distributed Query Optimization ± Distributed Transaction Management ± Data Replication ± Parallel Database Systems ± Data Integration Systems ± Web Search/Querying ± Peer-to-Peer Data Management ± Data Stream Management
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Distributed & Parallel DBMS Page 4. 43 M. Tamer Özsu Step 3 – Global Query Optimization Input: Fragment query ± Find the best (not necessarily optimal) global schedule z Minimize a cost function z Distributed join processing ² Bushy vs. linear trees ² Which relation to ship where? ² Ship-whole vs ship-as-needed z Decide on the use of semijoins ² Semijoin saves on communication at the expense of more local processing. z Join methods ² nested loop vs ordered joins (merge join or hash join)
Background image of page 2
Distributed & Parallel DBMS Page 4. 44 M. Tamer Özsu Cost-based Optimization ± Search (solution) space z The set of equivalent algebra expressions (query trees). ± Cost function (in terms of time) z I/O cost + CPU cost + communication cost z These might have different weights in different distributed environments (LAN vs WAN). z Can also maximize throughput ± Search algorithm z How do we move inside the solution space? z Exhaustive search, heuristic algorithms (iterative improvement, simulated annealing, genetic,…)
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Distributed & Parallel DBMS Page 4. 45 M. Tamer Özsu Query Optimization Process Search Space Generation Search Strategy Equivalent QEP Input Query Transformation Rules Cost Model Best QEP
Background image of page 4
Distributed & Parallel DBMS Page 4. 46 M. Tamer Özsu Search Space Q Search space characterized by alternative execution plans Q Focus on join trees Q For N relations, there are O( N !) equivalent join trees that can be obtained by applying commutativity and associativity rules SELECT ENAME,RESP FROM EMP, ASG, PROJ WHERE EMP.ENO=ASG.ENO AND ASG.PNO=PROJ.PNO PROJ ASG EMP PROJ ASG EMP PROJ ASG EMP × ENO ENO PNO PNO ENO,PNO
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Distributed & Parallel DBMS Page 4. 47 M. Tamer Özsu Search Space ± Restrict by means of heuristics z Perform unary operations before binary operations z ± Restrict the shape of the join tree z Consider only linear trees, ignore bushy ones R 2 R 1 R 3 R 4 Linear Join Tree R 2 R 1 R 4 R 3 Bushy Join Tree
Background image of page 6
Distributed & Parallel DBMS Page 4. 48 M. Tamer Özsu Search Strategy ± How to “move” in the search space. ± Deterministic z Start from base relations and build plans by adding one relation at each step z Dynamic programming: breadth-first z Greedy: depth-first ± Randomized z Search for optimalities around a particular starting point z Trade optimization time for execution time z Better when > 5-6 relations z Simulated annealing z Iterative improvement
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Distributed & Parallel DBMS Page 4. 49 M. Tamer Özsu Search Strategies ± Deterministic ± Randomized R 2 R 1 R 3 R 4 R 2 R 1 R 2 R 1 R 3 R 2 R 1 R 3 R 3 R 1 R 2
Background image of page 8
Distributed & Parallel DBMS Page 4. 50 M. Tamer Özsu ±
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/23/2009 for the course DBST 663 taught by Professor Tba during the Spring '09 term at MD University College.

Page1 / 32

QueryOpt - Outline Introduction Distributed DBMS...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online