Wait-for graph edges: T1 at Site1 waits for T2 at Site2. T2 at Site2 waits for T3 at Site1. T3 at Site1 waits for T1 at Site1.
Total Cost=Cost1+Cost2=8,000+80,000=88,000 bytesTotal Cost equals Cost sub 1 plus Cost sub 2 equals 8 comma 000 plus 80 comma 000 equals 88 comma 000 bytes Wait-for graph edges: T1 at Site1 waits for T2 at Site2
Cost=10,000×200 bytes=2,000,000 bytesCost equals 10 comma 000 cross 200 bytes equals 2 comma 000 comma 000 bytes Strategy 2: Semijoin Optimization A semijoin ( ) reduces the size of Ship RS to Site1 to join with T:
Compute R ⋉ S: project R.B values that appear in S.B. Assume 80% of R.B in S.B → 800 tuples. Ship R' (800 tuples) to Site2 to join with S → result RS of 400 tuples (estimated). Ship RS to Site1 to join with T: 400 ⨝ 2000 = 400 tuples final (assuming foreign key). Cost: transfer R' (800) + transfer RS (400) = 1200. 000 bytes to 88
Strategy B (Semi-join) reduces network traffic from 400,000 bytes to 88,000 bytes, making it the optimal choice. 3. Distributed Concurrency Control Distributed Deadlock Detection
The you need to optimize (e.g., network cost, latency, availability)