lecture6 - 3. Fetch ASG tuples as needed for each tuple in...

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

View Full Document Right Arrow Icon
This question is similar to the one posed in Session 5. However, our focus here is on optimization strategies. Again, assume that the relation PROJ of the Engineering database (see figure 2.4 of textbook) is horizontally fragmented, Describe an optimization strategy for the following query stating your justification: SELECT BUDGET FROM PROJ, ASG WHERE PROJ.PNO = ASG.PNO AND ASG.PNO = ''P4'' Do selection an projection first. Do union last because the cardinality=sum of cardinalities of each set. Parallelism As discussed before, the fragment Proj1 doesn’t contain any records with pno=”P4”. Therefore, we rewrite the query as SELECT BUDGET FROM PROJ2, ASG WHERE PROJ2.PNO = ASG.PNO AND ASG.PNO = ''P4'' Ozsu and Valduriez (1999) lists 4 possible strategies to execute the query, and those strategies are: 1. Ship whole PROJ2 to the site where ASG is stored - 2. Ship whole ASG to the site where PROJ2 fragment is stored
Background image of page 1

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

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 3. Fetch ASG tuples as needed for each tuple in PROJ2 - 4. Ship whole ASG and PROJ2 to the third side. size (PROJ2)=2 and 1 tuple satisfies the condition size(ASG)= 8 and 2 tuples satisfy the condition Strategy 2 is not the best because the size of ASG is larger than the size of PROJ2. Also, the query doesnt select any ASG attributes. Strategy 4 is the worst one because of the high communication expenses to ship both relations. This elimination leaves a choice between strategy 1 and 3. Since PROJ2 is not large, we pick strategy1. The optimization is: 1. Projection on PROJ2. Choose all tuples with PNO=P4 2. Move the result from step 1 to the site with ASG 3. Join with ASG 4. Select budget References Ozsu, M.T. & Valduriez, P. (1999). Principles of distributed database systems . New Jersey: Prentice Hall....
View Full 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 / 2

lecture6 - 3. Fetch ASG tuples as needed for each tuple in...

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

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