{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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

Info icon This 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
Image of page 1

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

View Full Document Right Arrow Icon
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 doesn’t 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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern