Distributed DBMS - CS712 Power Point Slides Lecture 35

Example join of an example external relation r with

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: sfers: comparison – Ship-whole • larger data transfer • smaller number of messages • better if relations are small – Fetch-as-needed • number of messages = O(cardinality of external relation) • data transfer per message is minimal • better if relations are large and the join selectivity is good. • Example, join of an Example, external relation R with an internal relation S, there are four strategies. four 1-Move outer relation tuples to the site of the inner relation • Can be joined as they arrive • Total Cost = LT (retrieve card(R) tuples from R) + CT (size(R)) + LT (retrieve s tuples from S) * card (R) 2- Move inner relation to the site of outer relation • cannot join as they arrive; they need to be stored • Total Cost = LT (retrieve card(S) tuples from S) + CT (size (S)) + LT (store card(S) tuples as T) + LT (retrieve card(R) tuples from R) + LT (retrieve s tuples from T) * card (R). 3- Fetch inner tuples as needed • For each tuple in R, send join attribute value to site of S • Retrieve matching inner tuples at site S • Send the matching S tuples to site of R • Join as they arri...
View Full Document

This document was uploaded on 02/26/2014.

Ask a homework question - tutors are online