Parallel Databases: Solutions To Practice Exercises
Parallel Databases: Solutions To Practice Exercises
Parallel Databases
95
96 Chapter 21 Parallel Databases
c. Even if two operations are independent, it may be that they both supply
their outputs to a common third operator. In that case, running all three on
the same processor may be better than transferring tuples across proces-
sors.
21.4 Relation r is partitioned into n partitions, r0 , r1 , . . . , rn−1 , and s is also parti-
tioned into n partitions, s0 , s1 , . . . , sn−1 . The partitions are replicated and as-
signed to processors as shown below.
s0 s1 s2 s3 . . . . sn 1
.
.
r0 P 0,0 P 0,1 .
rn 1 . . . . . . Pn 1,
n 1
21.6 a. The copies of the data items at a processor should be partitioned across
multiple other processors, rather than stored in a single processor, for the
following reasons:
• to better distribute the work which should have been done by the failed
processor, among the remaining processors.
• Even when there is no failure, this technique can to some extent deal
with hot-spots created by read only transactions.
b. RAID level 0 itself stores an extra copy of each data item (mirroring). Thus
this is similar to mirroring performed by the database itself, except that the
database system does not have to bother about the details of performing
the mirroring. It just issues the write to the RAID system, which automati-
cally performs the mirroring.
RAID level 5 is less expensive than mirroring in terms of disk space re-
quirement, but writes are more expensive, and rebuilding a crashed disk
is more expensive.