Database Reference
In-Depth Information
Figure 2. The DWPA architecture
are services that maintain local database sessions
and control the execution of commands locally
and the data exchange with other nodes. Finally,
the controller is a node which controls the whole
system (it can be replicated for fault tolerance
reasons), maintaining registries with necessary
information. When nodes enter the system, they
contact the controller to register themselves and
to obtain all the necessary information. In DWPA,
any computer can assume any role as long as it
runs the corresponding service.
We will now describe basic query processing
functionality. For simplicity, we start with the
simplest possible example. Consider a single
very large relation R partitioned into n nodes and
a sum query over some attribute x of the relation.
Formula (1) states that the sum of attribute x over
all nodes is simply the sum of the sums of x in
each node:
1)
a local query: sum(x) as sumx from Rlocal
2)
data transfer commands for every executor
node: send sumx to merger node
3)
a merge query for the merger node:
sum(sumx) from partial_results
4)
a signal to the submitter to pull the results
The Merger node is an Executor that is chosen
for merging the partial results if necessary. The
query processing steps depend heavily on the
placement layout of the data on the nodes. For
instance, if relation R is replicated into all nodes
or placed in a single node, the commands will be
(executed in a single node):
1)
a local query: sum(x) as sumx from R
2)
signal the submitter to pull the results
More complex queries can be processed in
a similar way, with some modifications. For in-
stance, the following SQL query is from the TPC-H
performance benchmark in (TPCC 2008) and com-
putes the sales of each brand per month:SELECT
p_brand, year_month, sum(l_quantity), count(*)
FROM JOIN lineitem LI, part P, time T, supplier
SWHERE year_month>= '1997' AND supplier =
x = ∑ all nodes over node i ( x )
(1)
The implementation of this very basic operation
in DWPA involves the submitter parsing the initial
query sum(x) from R and producing command lists
for every node with the following operations:
Search WWH ::




Custom Search