26
Distributed and Parallel Databases, 9, 211–236, 2001 c 2001 Kluwer Academic Publishers. Manufactured in The Netherlands. GeMDA: A Multidimensional Data Partitioning Technique for Multiprocessor Database Systems YU-LUNG LO [email protected] Department of Information Management, Chaoyang University of Technology, 168, GiFeng E. Rd., WuFeng, TaiChung County, Taiwan 413, Republic of China KIEN A. HUA [email protected] School of Electrical Engineering and Computer Science, University of Central Florida, Orlando, FL 32816-2362, USA HONESTY C. YOUNG [email protected] IBM Research Division, Almaden Research Center, San Jose, CA 95120-6099, USA Received April 10, 1998; Revised August 16, 1999 Recommended by: Patrick Valduriez Abstract. Several studies have repeatedly demonstrated that both the performance and scalability of a shared- nothing parallel database system depend on the physical layout of data across the processing nodes of the system. Today, data is allocated in these systems using horizontal partitioning strategies. This approach has a number of drawbacks. If a query involves the partitioning attribute, then typically only a small number of the processing nodes can be used to speedup the execution of this query. On the other hand, if the predicate of a selection query includes an attribute other than the partitioning attribute, then the entire data space must be searched. Again, this results in waste of computing resources. In recent years, several multidimensional data declustering techniques have been proposed to address these problems. However, these schemes are too restrictive (e.g., FX, ECC, etc.), or optimized for a certain type of queries (e.g., DM, HCAM, etc.). In this paper, we introduce a new technique which is flexible, and performs well for general queries. We prove its optimality properties, and present experimental results showing that our scheme outperforms DM and HCAM by a significant margin. Keywords: data allocation, data fragmentation, parallel database system, query processing, system utilization 1. Introduction There are several parallel architectures for designing multiprocessor database computers. However, a consensus has emerged that shared-nothing (SN) architecture [31] is most scalable to support very large databases [2, 5, 7, 17, 20, 22, 32, 33]. Such hardware struc- ture consists of a set of processing nodes (PNs) interconnected through a communication network. Each PN consists of a processor, its own memory, and local disk drives. The communication among PNs is carried out by message passing. In terms of software, the relations are typically declustered into fragments and spread across the PNs. Since in this

GeMDA: A Multidimensional Data Partitioning Technique for Multiprocessor Database Systems

Embed Size (px)

Citation preview

Page 1: GeMDA: A Multidimensional Data Partitioning Technique for Multiprocessor Database Systems

Distributed and Parallel Databases, 9, 211–236, 2001c© 2001 Kluwer Academic Publishers. Manufactured in The Netherlands.

GeMDA: A Multidimensional DataPartitioning Technique for MultiprocessorDatabase Systems

YU-LUNG LO [email protected] of Information Management, Chaoyang University of Technology, 168, GiFeng E. Rd.,WuFeng, TaiChung County, Taiwan 413, Republic of China

KIEN A. HUA [email protected] of Electrical Engineering and Computer Science, University of Central Florida, Orlando,FL 32816-2362, USA

HONESTY C. YOUNG [email protected] Research Division, Almaden Research Center, San Jose, CA 95120-6099, USA

Received April 10, 1998; Revised August 16, 1999

Recommended by:Patrick Valduriez

Abstract. Several studies have repeatedly demonstrated that both the performance and scalability of a shared-nothing parallel database system depend on the physical layout of data across the processing nodes of the system.Today, data is allocated in these systems using horizontal partitioning strategies. This approach has a number ofdrawbacks. If a query involves the partitioning attribute, then typically only a small number of the processingnodes can be used to speedup the execution of this query. On the other hand, if the predicate of a selection queryincludes an attribute other than the partitioning attribute, then the entire data space must be searched. Again, thisresults in waste of computing resources. In recent years, several multidimensional data declustering techniqueshave been proposed to address these problems. However, these schemes are too restrictive (e.g., FX, ECC, etc.), oroptimized for a certain type of queries (e.g., DM, HCAM, etc.). In this paper, we introduce a new technique whichis flexible, and performs well for general queries. We prove its optimality properties, and present experimentalresults showing that our scheme outperforms DM and HCAM by a significant margin.

Keywords: data allocation, data fragmentation, parallel database system, query processing, system utilization

1. Introduction

There are several parallel architectures for designing multiprocessor database computers.However, a consensus has emerged thatshared-nothing(SN) architecture [31] is mostscalable to support very large databases [2, 5, 7, 17, 20, 22, 32, 33]. Such hardware struc-ture consists of a set ofprocessing nodes(PNs) interconnected through a communicationnetwork. Each PN consists of a processor, its own memory, and local disk drives. Thecommunication among PNs is carried out by message passing. In terms of software, therelations are typically declustered into fragments and spread across the PNs. Since in this

Page 2: GeMDA: A Multidimensional Data Partitioning Technique for Multiprocessor Database Systems

212 LO, HUA AND YOUNG

model each PN processes the portion of the database on its disks, the degree of parallelismis determined by the physical layout of the data across the PNs of the system.

Essentially all of today’s SN systems allocate their data using horizontal partitioningstrategies (e.g., [24, 27, 30, 34], etc.). This simple approach has a number of drawbacks.For instance, in a range-based system if a range-select query involves the partitioningattribute, then typically not all of the PNs can be used to speedup the execution. On theother hand, if a range-select query whose predicate includes an attribute other than thepartitioning attribute, then the entire space must be searched. In this case, the PNs willtypically waste CPU cycles and I/O bandwidth only to determine that most of the datapages do not contain any relevant tuples. To illustrate these problems, let us consider theexample shown in figure 1 in which theSTUDENTrelation is horizontally partitioned basedon the attributeGPA(grade point average); and the tuples are distributed across four PNs,i.e., four is the optimal degree of declustering [4]. For the following query whose predicateinvolves the partitioning attribute:

“Retrieve the names of students who have aGPAbetter than 2.0,”

only half of the four PNs (P2 andP3) can participate in the execution of the query, althoughthere is a large number of students whose GPA’s fall into this category. On the other hand,for the following query whose predicate involves a non-partitioning attribute,MAJOR:

“Retrieve the names of students whomajor in Anthropology, ”

the entire relation must be searched even though only a small fraction of the students inthe university are anthropology majors. Although parallelism is maximized in this case

Figure 1. A horizontal data partitioning example.

Page 3: GeMDA: A Multidimensional Data Partitioning Technique for Multiprocessor Database Systems

GeMDA: A MULTIDIMENSIONAL DATA PARTITIONING TECHNIQUE 213

(i.e., all four PNs are used), the PNs are not doing useful work. Again, this results in wasteof computing resources. The first type of problem is less serious in a multi-user environmentas long as the system can effectively use all the remaining PNs (P0 andP1) for other queries(generally not achievable). The second type of problem, however, is inherent with horizontalpartitioning and cannot be easily addressed. A solution commonly used today is to speedupthe search operations on all the PNs using local secondary indices. This approach, however,is not effective for range queries. In this case, many random accesses to the data file willoccur across all the PNs. To address this problem, one can consider two alternatives:

1. The relation is horizontally partitioned and distributed across the PNs. Locally, eachpartition is organized as a grid file [23].

2. The relation is partitioned using multiple attributes. Locally, each partition can be orga-nized as a grid file.

The second approach was investigated in [12, 13, 15, 21]. Henceforth, we will refer tothese schemes asmultidimensional data partitioning(MDP) techniques (viewing horizontalpartitioning methods as unidimensional).

Two multidimensional data allocation methods have been proposed specifically for theSN environment. The scheme presented in [15, 21] by Hua and Lee attempts to allocate thegrid blocks in such a way to balance the data load among the PNs. The disadvantage of thistechnique is that it does not try to achieve the optimal degree of parallelism in processingpartial match queries. Another scheme, called MAGIC, was proposed by Ghandeharizadehet al. in [13]. This work focused on the data declustering issues (i.e., determining the shapeof the grid space). Each of the grid blocks is simply allocated to a distinct PN. Since thenumber of grid blocks increases exponentially with the increase in the number of dimension,the usefulness of this scheme is limited to applications with a small number of partitioningattributes. For instance, for a relation with three partitioning attributes, each represented bya dimension with 16 intervals, MAGIC will use 16× 16× 16 or 4,096 PNs to store thisrelation. To address this problem, a blocking technique was investigated in [12, 14], whichdivides the grid intoP blocks and assigns each one to its own PN. Unfortunately, blockingadjacent grid blocks into super blocks will favor some queries over others. Consider theexample, shown in figure 2, borrowed from [14]. Each of the following two queries needsto examine the same number of grid blocks (12):

Query 1: Retrieve all employees whose salary is between $46,000 and $60,000.Query 2: Retrieve all employees whose salary is between $56,000 and $80,000.

However, Query 2 is unfairly allowed to use twice as many PNs (6 vs. 3).MDP techniques have also been investigated under a different, perhaps more general, con-

text, namely multidisk systems. Adapting these schemes for a SN environment is straightfor-ward. TheDisk Modulo(DM) method was proposed by Du and Sobolewski [6] in the early80’s. More recent techniques includeField-wise Exclusive-or(FX) by Kim and Pramanik[19],Error Correcting Codes(ECC) by Faloutsos and Metexas [9], another coding-theoreticapproach by Abdel-Ghaffar and Abbadi [1],Hilbert Curve Allocation Method(HCAM) byFaloutsos and Bhagwat [8],Vector Based Declustering(VBD) by Chen and Rotem [3], andCyclic Allocationby Prabhakar et al. [26]. Among these schemes, FX and ECC are too

Page 4: GeMDA: A Multidimensional Data Partitioning Technique for Multiprocessor Database Systems

214 LO, HUA AND YOUNG

Figure 2. Blocking example.

restrictive. They have restrictions on the number of available PNs which must be a powerof 2. In addition, ECC has a restriction on the cardinalities of the attributes which mustbe power of 2 also. This is too inflexible. Depending on the size of a relation and otherperformance factors, we want to have the flexibility in determining the optimal number ofpartitions which should not have to be a power of two. The approach proposed in [1] is lessrestrictive. However, it still requires that the domain of each attribute is divided into the samenumber of ranges. VBD was designed for image and cartographic databases. The authorswere interested in fixed radius queries rather than arbitrary shaped range queries. CyclicAllocation in [26] is a general class of declustering methods. Furthermore, both schemes,VBD and Cyclic Allocation, are also restrictive to 2-dimensional file. HCAM and DM arevery flexible. However, they are optimized for a certain type of queries. Our experimentalresults show that while DM outperforms HCAM on partial match queries by a wide margin,its performance is significantly worse than that of HCAM under range queries.

In this paper, we will introduce a more general technique whose good performance is notsusceptible to the type of the queries. The goal of our data allocation strategy is to allowqueries to use as many PNs as possible and at the same time maintain a highly balancedworkload for these PNs. Our simulation study comparing its performance to DM and HCAMindicates that only the proposed scheme can consistently perform well under both partialmatch and range queries. Furthermore, as in DM and HCAM, the proposed technique isfree of restrictions on the number of intervals for each dimension. In other words, the useris able to control the shape of the partitioning space and the desired number of grid blocksto suit her applications. Due to its generality, we will refer to this new technique as GeMDA(General Multidimensional Data Allocation) in this paper.

The remainder of this paper proceeds as follows. In Section 2, we briefly review DM andHCAM to make the paper self contained. The proposed technique is presented in details inSection 3. In Section 4, we describe the simulation model, and give the simulation results toshow that the new technique is better and more general than DM and HCAM. To explain its

Page 5: GeMDA: A Multidimensional Data Partitioning Technique for Multiprocessor Database Systems

GeMDA: A MULTIDIMENSIONAL DATA PARTITIONING TECHNIQUE 215

good performance, the optimality properties of GeMDA is formally analyzed in Section 5.Finally, we state our conclusions in Section 6.

2. Existing multidimensional data allocation techniques

We note that fully declustering (i.e., the relation is distributed across all the PNs) in generaldoes not yield optimal performance due to overhead associated with parallel execution (suchas setup costs) [4]. A number of satisfactory techniques have been proposed to address thisissue (e.g., [4, 11–13]). In this paper, we assume that these schemes have been used todesign the shape of the partitioning space. For instance, a simple approach is to apply thetechnique (based on the access frequencies of data records) presented in [4] to determinethe optimal degree of declustering, sayN, for a given relation. This degree of declusteringcan be used as the number of intervals for each of the dimension, and a multidimensionaldata allocation technique can then be used to distribute the grid blocks among theseNPNs. A more aesthetic technique is presented in [12, 13]. It provides formulae to computethe desirable number of intervals for each of the dimensions. The number of intervals onthe “longest” dimension (having the largest number of intervals) can then be used as thedegree of declustering for this relation. Thus, the number of PNs,N, used in this and thesubsequent sections should not be interpreted as the number of all the PNs in the parallelsystem. Instead, it represents the optimal degree of declustering or the desirable degree ofparallelism for processing the given relation. In this paper, we will use the terms “optimaldegree of declustering” and “optimal degree of parallelism” interchangeably.

Let A1, A2, . . . , An be the attributes of a relation, andDi be the domain of attributeAi .A d-dimensional data partitioning scheme declusters a file into grid blocks by dividingdof the domainsDi ’s into Ni intervals. Thus, the domain of a grid block is the cross productof d intervals. To store such a file structure in a SN system, the grid blocks are allocatedto the PNs as a unit. The grid blocks assigned to the same PN form a local partition whichcan be stored using standard techniques used in sequential DBMSs. In this paper, we willonly focus on techniques for allocating the grid blocks. They should be divided among thePNs in such away to help localize search operations on the data file to a small number ofgrid blocks. Furthermore, the system should be able to use as many PNs as possible (upto the optimal degree of parallelism) in processing these relevant grid blocks. That is, wewant to be able to maximize parallelism, but without incurring too much parallel processingoverhead, and without wasting any of the PNs searching irrelevant disk blocks. Obviously,when a search is localized to only few, sayb, grid blocks due to a query which involves alarge number of attributes, it makes sense to use onlyb of the PNs. This condition, however,is not the same as the horizontal partitioning example which searches for students with“GPA> 2.0” discussed in Section 1. In the horizontal example, only some of the PNs areused to search a large portion (likely more than half) of the file and the unused PNs arewasted for a long period of time. In the MDP case, the PNs are used to search only a fewgrid blocks (i.e., a very small fraction of the file). Therefore, the waste of the unused PNsis minimal. Anyway, since such small queries which involve a large number of attributesoccur infrequently in practice, a good MDP technique should be able to achieve optimalparallelism most of the time.

Page 6: GeMDA: A Multidimensional Data Partitioning Technique for Multiprocessor Database Systems

216 LO, HUA AND YOUNG

A number of data allocation methods for such multidimensional files have been proposed.In this paper, we will only compare our scheme to HCAM and DM since they are lessrestricted than the other techniques, and are known to perform well [6, 8]. In the followingsubsections, we will provide a brief overview of these two methods to make the paper selfcontained.

2.1. Hilbert curve allocation method (HCAM)

HCAM is based on the idea of space filling curves [10]. A space filling curve visits allpoints in ak-dimensional space grid exactly once and never crosses itself. Thus it can beused to impose a linear ordering on the grid blocks of a multidimensional file scheme(figure3a). Jagadish suggested in [18] that this concept can be used to allocate a grid file [23]to the blocks of a disk system to minimize the disk access effort. In [8], Faloutsos andBhagwat used Hilbert curve to design a data allocation strategy for multidisk (or SN)systems. In this scheme, the Hilbert Curve was used to traverse the grid blocks and as-sign each one to a disk unit (or PN) in a round-robin fashion (figure 3b). The intuitionis that two grid blocks far away in the linear ordering would also be far away in thek-dimensional grid [8]. This method was shown to provide good performance on square rangequeries [8].

2.2. Disk modulo (DM) allocation

We denote a grid block of a multidimensional file by its coordinate. For instance, letD1

and D2 be the domains of the partitioning attributesA1 and A2, respectively. Then,(i, j )represents the grid block that covers thei th interval of D1, and thej th interval of D2. InDM, block (X1, X2, . . . , Xd), where 0≤ Xi < N, is assigned to PNDM(X1, X2, . . . , Xd)

Figure 3. An HCAM example.

Page 7: GeMDA: A Multidimensional Data Partitioning Technique for Multiprocessor Database Systems

GeMDA: A MULTIDIMENSIONAL DATA PARTITIONING TECHNIQUE 217

Figure 4. A 16× 16 DM example.

which is computed as follows:

DM(X1, X2, . . . , Xd) =(

d∑i=1

Xi

)mod N,

whereN is the number of PNs. A 16× 16 DM example is given in figure 4.We note that a generalized DM (GDM) technique was also presented in [6]. The allocation

function for GDM is as follows:

GDM(X1, X2, . . . , Xd)=(

d∑i=1

(Xi · Pi )

)mod N,

where N is the number of PNs, and eachPi is a positive integer relative prime toN.However, since there is no general method to determine the properP1, P2, . . . , Pd, they areset to 1 (which reduces to the simple DM allocation method) in this study.

3. Proposed technique: GeMDA

The proposed technique, GeMDA, is presented in this section. In this scheme, a grid block(X1, X2, . . . , Xd) is assigned to PNGeMDA(X1, X2, . . . , Xd), where

GeMDA(X1, X2, . . . , Xd)

=(

d∑i=2

⌊Xi ·GCDi

N

⌋+

d∑i=1

(Xi · Shf disti

))modN, (1)

in which N is the number of PNs (or the optimal degree of declustering),Shf disti =b d√

Nci−1, andGCDi = gcd(Shf disti , N). We note that the number of intervals on eachdimension does not have to be identical. That is, the partitioning space can have any hyper-rectangular shape of any size.

Page 8: GeMDA: A Multidimensional Data Partitioning Technique for Multiprocessor Database Systems

218 LO, HUA AND YOUNG

Although the general mapping function shown in Eq. (1) is convenient for quickly deter-mining the location of a grid block, it is not intuitively obvious how it works. In order to gaininsight on the allocation patterns and properties of the proposed technique, in the followingsubsections we will examine GeMDA in its procedural form. These procedures also facil-itate the proofs given in the appendix. For simplicity, we will assume that each dimensionhas exactlyN intervals. However, the reader should keep in mind that this condition is notrequired in GeMDA. Eq. (1) can be used without such restrictions.

3.1. Two-dimensional algorithm

To appeal to the reader’s intuition, we first describe the procedure for two-dimensional fileshere. This procedure will be generalized to arbitrary dimensions in the next subsection.

GivenN PNs, we organize the data file as a two dimensional grid structure such that eachdimension has exactlyN intervals. The allocation of these grid blocks to the PNs is doneas follows:

1. We compute theshift distance, shf dist= b√Nc.2. Mark the top most row as thecheck row.3. PNs 0, 1, . . . , N − 1 are assigned to theN grid blocks of this row from left to right. Go

to the next row.4. The allocation pattern for the current row is determined by circular left shift the pattern

of the row above it byshf dist positions.5. If the allocation pattern of the current row is identical to that of the check row, we perform

circular left shift on the current row one more position and mark it as the new check row.6. If there are more rows to consider, repeat steps 4, 5 and 6 for the next row.

The idea is to “duplicate” each PN uniformly throughout the partitioning space. Therefore,any query represented by a subspace of this partitioning space will “contain” the samenumber of occurence for each PN. This condition should result in good system utilizationand balanced workload for each PN. This intuition will be examined more formally later.

A 16× 16 example is given in figure 5 to illustrate this data allocation technique. In thiscase, the shifting distance is 4 (= b√16c). We observe that the mapping for each row isobtained by circular-left-shifting the row above it four positions; except that rows 4, 8, and12 are obtained by circular-left-shifting rows 3, 7 and 11, respectively, five positions. Thiscan be explained as follows. When row 4 is being considered, row 0 is the current checkrow. Since circular-left-shifting row 4 four positions results in a pattern which is identicalto row 0, we have to shift row 4 left one more position. The same applies to rows 8 and 12.

The GeMDA strategy for 2-dimensional files can be presented more formally as follows.

Algorithm 2D GeMDA:

Input: Block[N][N] is an empty array representing theN × N grid blocks of the 2-d̄imensional file;N is the number of PNs.

Output: Each element of the arrayBlock[N][N] is assigned an integer value between 0andN − 1. “Block[i ][ j ] = p” denotes the assignment of PNp to the grid blockBlock[i ][ j ].

Page 9: GeMDA: A Multidimensional Data Partitioning Technique for Multiprocessor Database Systems

GeMDA: A MULTIDIMENSIONAL DATA PARTITIONING TECHNIQUE 219

Figure 5. 16× 16 GeMDA.

beginShf dist← b√Nc;for ( j ← 0; j < N; j ← j + 1)

Block[0][ j ] ← j ; /* No shift for row 0 */end-forCheckrow← 0;

for (i ← 1; i < N; i ← i + 1)if (Block[Checkrow][0] = Block[i − 1][Shf dist])

/* current row has the same mapping as rowcheckrow */for ( j ← 0; j < N; j ← j + 1)

Block[i ][ j ] ← Block[i − 1][(Shf dist+ j + 1)modN];end-forCheckrow← i ; /* setCheckrow to current row */

elsefor ( j ← 0; j < N; j ← j + 1)

Block[i ][ j ] ← Block[i − 1][(Shf dist+ j )modN];end-for

end-ifend-for

end

3.2. Handling higher dimensions

In this subsection, we extend the 2DGeMDA algorithm to handle three or more dimensions.For clarity, we first consider the 3-dimensional case. A cube withN3 grid blocks can be seenasN 2-dimensional planes stacked up in the third dimension. Let’s label theseN planes 0to N − 1. The allocation strategy for this cube is given in the following algorithm.

Page 10: GeMDA: A Multidimensional Data Partitioning Technique for Multiprocessor Database Systems

220 LO, HUA AND YOUNG

Algorithm 3D GeMDA:

Step 1: We compute the mapping for the first rows of all the 2-dimensional planes byconsidering these rows collectively as forming a plane along the third dimension.We apply the 2DGeMDA algorithm to this plane, except that the shifting distanceis set tob 3

√Nc2.

Step 2: We apply the 2DGeMDA algorithm to each of the 2-dimensional planes using theshifting distanceb 3

√Nc and the first row already computed in Step 1.

A (9× 9× 9) example is given in figure 6 to illustrate the 3DGeMDA algorithm. We firstapply step 1 to fill the grid blocks of the top plane (XY-plane) usingShf dist=b 3

√9c2= 4.

We then apply Step 2 to each of the planes parallel to this page (XZ-planes) usingShf dist=b 3√

9c=2.We need to introduce a couple more concepts before we can discuss the strategy

for m-dimensional allocation. In a hypercube, a plane can be identified by specifyingits coordinate. For instance,(W= 0, X= x,Y=x, Z= 1), where ‘x’ denotes the entiredomain space of the respective dimension, represents a 2-dimensional plane. A set ofplanes are said to belong to the(Xi · · · X j )-family if any two of their Xi -coordinate,. . .,X j -coordinate are unspecified. For instance, the following planes belong to the(XY Z)-family:

(W= 0, X= x,Y= x, Z= 1)

(W= 3, X= 2,Y= x, Z= x)

(W= 2, X= x,Y= 3, Z= x)

Using these concepts, we can describe themD GeMDA strategy as follows.

Figure 6. A three dimensional GeMDA example.

Page 11: GeMDA: A Multidimensional Data Partitioning Technique for Multiprocessor Database Systems

GeMDA: A MULTIDIMENSIONAL DATA PARTITIONING TECHNIQUE 221

Algorithm mD GeMDA:

Step 1: We apply the 2DGeMDA algorithm to the plane denoted by(X0= x, X1= x,X3= 0, X4= 0, · · · , Xm−1= 0) usingShf dist=b m

√Ncm−1.

Step 2: We apply the 2DGeMDA algorithm to each of the planes in the(X0X1X2)-family whose first rows have been determined in Step 1. In this step, we useShf dist=b m

√Ncm−2.

Step 3: We apply the 2DGeMDA algorithm to each of the planes in the(X0X1X2X3)-family whose first rows have been determined in Step 2. In this step, we useShf dist=b m

√Ncm−3.

Step 4: We apply the 2DGeMDA algorithm to each of the planes in the(X0X1X2

X3X4)-family whose first rows have been determined in Step 3. In this step,we useShf dist=b m

√Ncm−4.

Step m− 1: We apply the 2DGeMDA algorithm to each of the planes in the(X0X1 · · ·Xm−1)-family whose first rows have been determined in Stepm− 2. In thisstep, we useShf dist=b m

√Nc.

We note that themD GeMDA algorithm as presented above contains a lot of redundantwork (i.e., each grid block is assigned to the same PN more than once). However, sucha presentation is much easier to visualize. We recall that the purpose of these algorithmsis only to illustrate the data allocation patterns of GeMDA and to facilitate the proofs inthe Appendix. In practice, it would be much more efficient to use the mapping formuladiscussed previously.

4. Simulation study

In order to compare our scheme to DM and HCAM, we developed a detailed simulator fora shared-nothing database management system. In the following subsections, we describethe simulation model, present the simulation results, and discuss interesting observations.

4.1. Simulation model

The simulator used in our study is depicted in figure 7. TheQuery Generatorgeneratesrandom queries. A total of 10,000 queries were created for each simulation run. Whenever

Figure 7. Simulator.

Page 12: GeMDA: A Multidimensional Data Partitioning Technique for Multiprocessor Database Systems

222 LO, HUA AND YOUNG

resources (i.e., PNs) become available, theSchedulerexamines the queries in theQueryQueue(see figure 7), and selects queries for execution based on alargest-fit-firststrategy.Let Nc be the number of currently free PNs, thelargest-fit-firststrategy can be described asfollows:

1. If Nc> 0, form aCandidate Setby selecting from the query queue the queries whoserequired PNs are currently free.

2. Select from theCandidate Setthe query, sayQlargest, which requires the largest numberof PNs, sayn, for execution. (n is set to zero ifCandidate Setis empty.)

3. RemoveQlargest from the query queue.4. Nc= Nc − n.5. If n 6= 0 then GO TO 1.6. Call Query Generator to generate new queries.

Thus, new queries are generated on demand. In other words, we assumed that the arrivalrates of the queries match the processing rate of the parallel system well. This assumptionis reasonable because our objective is to compare the performance of the data placementschemes. TheExecutorsimulates the execution of queries, collects performance data, andinforms the scheduler when resources become available. Obviously, our simulator supportsa multiuser environment, in which multiple queries can be executed in parallel to maximizethe system utilization.

The following system and workload parameters were used in our study:

PARAMETER VALUES

number of PNs 16, 32, 64, or 128

number of partitioning attributes 3

number of intervals on each dimension number of PNs

sizes of grid blocks varied (discussed shortly)

size of the relation about 42 million tuples

processing power per PN can process one tuple per time unit

We note that the size of the relation is maintained at about 42 million tuples for eachsimulation run. This is achieved by varying the sizes of the grid cells as follows:

SYSTEM SIZE CELL SIZES

16 PNs 5,120 to 15,360 tuples

32 PNs 640 to 1,920 tuples

64 PNs 80 to 240 tuples

128 PNs 10 to 30 tuples

A random number generator was used to generate cell sizes within the ranges given above.We intentionally made the ranges large enough to allow correlations among the attributes,i.e., the sizes of the cells deviate significantly. Once the grid had been created, the cells were

Page 13: GeMDA: A Multidimensional Data Partitioning Technique for Multiprocessor Database Systems

GeMDA: A MULTIDIMENSIONAL DATA PARTITIONING TECHNIQUE 223

allocated to the PNs using DM, HCAM or GeMDA. The relation size of 42 million tuplesis rather large for the smaller systems of 16 and 32 PNs. However, we wanted to keep therelation size about constant for all system configurations, so that we could investigate thescalability of the data placement strategies.

Three metrics were used in our comparative study:Average Execution Time(AET),Throughput(T), andSystem Utilization(U ). AET is computed as follows:

AET= 2

∑10,000i=1 ETi

10, 000,

whereETi denotes the execution time of thei th query. We note that the execution time doesnot include waiting time. It measures the time it takes the system to process the query sincethe required resources became available. Since the simulator processes 10,000 queries foreach simulation run, the average execution time is computed by dividing the sum of theexecution times of the individual queries by 10,000. Throughput (per 1 million time units)is calculated as follows:

T = 10, 000

T T× 106,

whereT T is the total time used to process the 10,000 queries. Thus,T measures the averagenumber of queries processed per one million time units. System Utilization is defined asfollows:

U =∑N

i=1 Ui

N,

whereUi represents the utilization of thei th PN. In our study, eachUi was derived fromthe simulation by keeping track of the fraction of time thei th PN was busy. Thus,U iscomputed as the average of the utilizations of theN PNs in the system.

In our experiments, a query is represented by a hyper-rectangle nested in the partitioningspace (i.e., the grid) of the operand relation. Thus, the execution of a query involves pro-cessing the tuples contained in the grid cells enclosed by the corresponding hyper-rectangle.In order to show that GeMDA is more general than DM and HCAM, both partial matchqueries and range queries were considered. The results of these experiments are presentedin the following two subsections.

4.2. Performance on partial match queries

We first compare the performance of DM, HCAM and GeMDA under partial match queries.This type of queries was used in [6] to evaluate their DM technique. Apartial match query qis ann-tuple〈v1, v2, · · · , vn〉, wherevi is either a value from the domain of thei th attributeor is unspecified, and where the number of unspecified attributes must be at least one [28]. Ifvi is specified, it determines a single interval on thei th dimension of the grid space. Withoutloss of generality, we assumed that the relations were partitioned based on three partitioning

Page 14: GeMDA: A Multidimensional Data Partitioning Technique for Multiprocessor Database Systems

224 LO, HUA AND YOUNG

Table 1. Average execution times under partial match queries.

HCAM DM GeMDA

No. of PNs AET AET Saving AET Saving

16 148987.19 99957.06 32.91% 98494.75 33.89%

32 47388.84 23508.13 50.39% 23503.79 50.40%

64 13898.72 5673.18 59.18% 5660.81 59.27%

128 3786.01 1381.20 63.52% 1381.06 63.52%

Table 2. Throughputs per one million time units under partial match queries.

HCAM DM GeMDA

No. of PNs Throughput Throughput Improvement Throughput Improvement

16 7.31 10.00 36.75% 10.15 38.78%

32 25.72 42.54 65.42% 42.55 65.45%

64 96.60 176.27 82.47% 176.65 82.87%

128 361.89 724.01 100.06% 724.08 100.08%

attributes (i.e., other attributes are rarely used in queries). Furthermore, we considered onlyqueries that involve one or more of these partitioning attributes. The average execution timesand the system throughputs of the three MDP schemes under this workload are given inTables 1 and2, respectively. In these tables, the worst scheme is used as the reference tocompute the savings and improvements achievable by the other two better techniques. Forinstance, thesavingin the average execution time due to DM is computed as follows:

Saving(DM)= AET(HCAM)− AET(DM)

AET(HCAM);

and theimprovementon the system throughput is as calculated below:

Improvement(DM)= T(DM)− T(HCAM)

T(HCAM).

We note thatImprovementmeasures the percentage of the improvement.Let’s define a few terminologies needed for the discussion of the experimental results.

Given anm-dimensional data file, the grid blocks accessed by a query form a subspace ofthe partitioning space of the data file. We will refer to the shape of this subspace as theshapeof the query. Thus, a query can be seen as havingm dimensions. We define theaspectratio of a query as the ratio of its dimensions. For instance, let’s consider a 3-dimensionaldata file. A partial match query with two specified attributes will have an aspect ratio of1 : 1 :N, whereN is the number of intervals on the third dimension. We can viewn : n : nas acubeaspect ratio, 1 :N : N as awideaspect ratio, and1 : 1 :N as avery wideaspectratio. These concepts are illustrated in figure 8.

Page 15: GeMDA: A Multidimensional Data Partitioning Technique for Multiprocessor Database Systems

GeMDA: A MULTIDIMENSIONAL DATA PARTITIONING TECHNIQUE 225

Figure 8. Aspect ratios of queries

We observe in Tables 1 and 2 that GeMDA and DM perform comparably. They providevery significant improvement over HCAM. For our workload, the average saving in exe-cution time ranges from 32.91% to 63.52%; and the improvement on system throughput isbetween 36.75% and 100.08%. The poor performance of HCAM is due to the fact that itis customized for cube-aspect-ratio queries. The shapes of partial match queries, however,have wider aspect ratios that seriously affect its performance. We observed the same degreeof degradation for both wide and very wide ratios. The degradation, however, is more severewhen we increase the number of PNs. This is due to the fact that the increase in the numbersof intervals makes the aspect ratios of the partial match queries even wider.

The poorer performance of HCAM can be attributed to its low system utilization. Thecurves shown in figure 9 are consistent with the results presented in Tables 1 and 2. As weincrease the number of PNs, the system utilization of DM and GeMDA improves slightlywhile that of HCAM drops quite significantly. This explains the biggerSavingandImprove-mentwhich are achievable by DM and HCAM in larger systems.

4.3. Performance on range queries

Range queries are another important class of queries, and were used in [8] to investigatetheir HCAM technique. In this subsection, we present the performance data of DM, HCAMand GeMDA under this workload. Arange queryis similar to partial match queries, exceptthat a range of values is specified for an involved attribute rather than just a single value.Furthermore, all the attributes can be specified. The results of these experiments are givenin Tables 3 and4. We note that the performance of HCAM improves substantially over itsown performance under partial match queries. This is due to fact that the aspect ratios ofrange queries tend to be less wide. In fact, HCAM outperforms DM by as much as 25.42%in term of average execution time, and 31.09% in terms of system throughput. Nevertheless,

Page 16: GeMDA: A Multidimensional Data Partitioning Technique for Multiprocessor Database Systems

226 LO, HUA AND YOUNG

Table 3. Average execution times under range queries.

DM HCAM GeMDA

No. of PNs AET AET Saving AET Saving

16 232687.77 209079.76 10.15% 186365.66 19.91%

32 94820.70 81719.62 13.82% 70608.43 25.53%

64 41023.70 32472.56 20.84% 29426.61 28.27%

128 19173.21 14299.63 25.42% 13470.33 29.74%

Table 4. Throughputs per one million time units under range queries.

DM HCAM GeMDA

No. of PNs Throughput Throughput Improvement Throughput Improvement

16 4.47 4.85 8.58% 5.39 20.54%

32 10.88 12.37 13.67% 14.18 30.25%

64 25.03 30.90 23.45% 33.99 35.81%

128 53.40 70.00 31.09% 74.24 39.03%

Figure 9. System utilization under partial match queries.

the proposed technique, GeMDA, remains the performance leader. It provides savings onaverage execution time as high as 29.74%, and throughput improvements of up to 39.03%.The superiority of GeMDA is due to the fact that it is the only scheme which can maintain thehigh system utilization(see figure 10) in these experiments. We note that the performance ofHCAM will eventually catch up with GeMDA when the system becomes very large. Underthis condition, both techniques will have their system utilizations very close to optimal.

Page 17: GeMDA: A Multidimensional Data Partitioning Technique for Multiprocessor Database Systems

GeMDA: A MULTIDIMENSIONAL DATA PARTITIONING TECHNIQUE 227

Figure 10. System utilization under range queries.

Comparing Figures 9 and 10, we see that the curves for HCAM and DM slide downfards inFigures 9 and 10, respectively. Only the system utilization of GeMDA are consistently high;and the curves are rising in both of these figures. From this observation, we can concludethat only the proposed method is immune from the effect of the different aspect ratios ofthe various types of queries. This robustness property confirms our initial assessment thatGeMDA is more general than either DM or HCAM.

4.4. Degree of balance

Let’s now examine how well GeMDA can evenly distribute the records among the PNs.To study this, we randomly created 3-dimensional files with nonuniform block sizes. Thatis, some of the grid blocks contain more records than the others. To examine the effect ofthis fluctuation in block sizes on the degree of balance, we evaluate GeMDA under fivedifferent workloads. The degree of fluctuation in block sizes was gradually increased from“50–80” to “50–160”, where “x–y” denotes a fluctuation condition in which each of thegrid blocks contains fromx to y records. The exact tuple count for each block was generatedrandomly to meet this condition. Thus, “50–80” indicates a mild fluctuation, whereas “50–160” represents a much more severe condition. For each data file, we assign the grid blocksto 16 PNs using GeMDA. The tuple count at each PN is then inspected, and its value enteredin Table 5. Our data shows that the files are nearly equally distributed among the PNs evenwithout using any re-balancing algorithm.

5. Optimality properties of GeMDA

To explain the robustness of GeMDA as indicated by the simulation results, we discuss itsoptimality properties in this section. To simplify the analyses, we assume that the numberof intervals on each dimension is equal to the number of PNs, and each grid block contains

Page 18: GeMDA: A Multidimensional Data Partitioning Technique for Multiprocessor Database Systems

228 LO, HUA AND YOUNG

Table 5. Tuple counts at each PN under various workloads.

Ranges for Block Sizes (in tuples)

ID of PNs 50–80 50–100 50–120 50–140 50–160

0 16536 19289 21430 23868 27056

1 16702 19089 21760 24127 26760

2 16793 19454 21608 24426 27500

3 16749 19421 21484 24133 26276

4 16684 19011 22028 23519 26484

5 16534 19241 22357 24401 26072

6 16628 19309 21836 24072 26464

7 16797 19120 22133 24575 26575

8 16524 19261 21516 24291 27070

9 16503 18981 21858 25039 27423

10 16576 19308 21807 23364 26061

11 16553 19012 22115 24425 26944

12 16743 19066 21191 24242 27469

13 16490 19224 21471 24257 26937

14 16689 19286 21768 24049 26087

15 16624 18969 22316 24560 27330

the same number of data pages. Since the sizes of the gird blocks are uniform, we will referto the number of grid blocks accessed by a query as thesizeof this query for the remainingof this paper.

Two important factors that affect the execution time of a query are the processorusageconditionand the workloadbalance condition. The usage condition measures how wellthe execution of a query can take advantage of all the available PNs (assigned to storethis relation) to speedup the execution. For instance, Consider a relation whose degree ofdeclustering is 16, using 16 PNs to perform a search on this relation is likely to be faster thansearching it using only 8 PNs. On the other hand, a balance condition indicates how balancethe workload is distributed across the useful PNs. Obviously, an imbalance condition willcreate a bottleneck in the parallel computation, and therefore will affect the execution timeof the query. For instance, evenly distributing the workload among 8 PNs is more efficientthan using 16 PNs to execute the same query where one of them must process 3/16 (> 1/8) ofthe data. The goal of a data allocation strategy, therefore, is to allow queries to use as manyPNs as possible (up to the optimal degree of parallelism), and at the same time maintain ahighly balanced workload for these PNs.

Since a strict optimality is too strong and cannot be attained [29], in general, we considerhere an optimality defined in terms of usage condition and balance condition as follows:

Definition 1. A data allocation strategy isusage optimalwith respect to a query type if theexecution of such queries can always use all the PNs available for a given relation, unless

Page 19: GeMDA: A Multidimensional Data Partitioning Technique for Multiprocessor Database Systems

GeMDA: A MULTIDIMENSIONAL DATA PARTITIONING TECHNIQUE 229

the size of the query, sayk grid blocks, is less than the degree of declustering of this relation.In which case, the usage condition is considered optimal if the execution of this query canusek PNs.

Definition 2. A data allocation strategy isbalance optimalwith respect to a query type ifthe execution of such queries always results in a balanced workload for all the PNs involved.

Definition 3. A data allocation strategy isoptimalwith respect to a query type if it is bothusage optimal and balance optimal with respect to this query type.

The desirable properties provided by GeMDA can be summarized in the following twotheorems (the proofs are given in the Appendix):

Theorem 1. GeMDA is optimal with respect to partial match queries.

Theorem 2. GeMDA is optimal with respect to km-hypercube queries, where m is thenumber of dimensions of the partitioning space, and k is the largest integer such thatkm< b m

√Ncm (N is the number of PNs used to store this relation, or the degree of

declustering).

In other words, the design of GeMDA was guided by the following heuristic:

if a data allocation strategy performs optimally for partial match queries and small hy-percube (km-hypercube) queries, then it should be able to handle general queries (whichcan have any shape and size) almost optimally.

The significance of small hypercube queries is as follows. If all the small hypercubequeries which can possibly contained in a larger hyper-rectangle query of any shape canbe executed optimally, then the system should also be able to process the enclosing querywith similar efficiency. The inclusion of partial match queries in the heuristic is to coverqueries with wide aspect ratios. In Table 6, we compare the three data allocation schemesunder these two optimality properties. Since only GeMDA possesses both of these features,only its performance is not susceptible to the shapes of general queries. This behavior wasconfirmed by the simulation results presented in Section 4.

Table 6. Optimality comparison.

Optimal with respect toAllocationscheme Partial match queries Small hypercube queries

HCAM No No

DM Yes No

GeMDA Yes Yes

Page 20: GeMDA: A Multidimensional Data Partitioning Technique for Multiprocessor Database Systems

230 LO, HUA AND YOUNG

6. Conclusion

In this paper, we have introduced a general data allocation technique, GeMDA, for multi-dimensional files in a shared-nothing environment. Partial match queries and range querieswere used to evaluate DM in [6] and HCAM in [8], respectively. To evaluate the generality ofthe proposed technique, both of these types of queries were used in this paper to compare itsperformance to those of HCAM, and DM. Our simulator assumes a multiuser environment,in which multiple concurrent queries can be executed simultaneously. Each simulation runconsists of 10,000 randomly generated queries. Our results indicate that only GeMDA isable to sustain the various types of queries. We observed that DM and HCAM experiencedsignificant degradation in performance under range and partial match queries, respectively.The robustness of GeMDA can also be seen in our study of the system utilization. It showsthat only GeMDA can maintain good system utilization for both types of workloads. Toexplain these desirable characteristics, we formally proved that GeMDA is optimal withrespect to both partial match queries and small hypercube queries in terms of system usageand balance conditions.

Future research could focus on the parallel query processing techniques for multidimen-sional file environment. We are currently implementing a parallel database system on a64-processor nCUBE/2 computer using the storage concept discussed in this paper. Oursystem, at this time, can accept a simple SELECT-FROM-WHERE query as input, trans-late it into a query graph, and plan the execution strategy as the graph is being executed(i.e., dynamic optimization). Another unique feature of our system is that it includes thecost of load balancing as a new factor for query optimization. An optimizer-assisted loadbalancing technique was used to implement this feature [16].

Appendix

In this appendix, we present two lemmas and show the proofs for the theorems presentedin Section 5. The theorems are repeated here for the convenience of the readers.

Lemma 1. Algorithm 2DGeMDA is optimal with respect to partial match queries re-gardless of the shift distances used (1≤Shf dist≤ N, where N is the number of PNs), aslong as the grid blocks of the first row are assigned to distinct PNs.

Proof: In a two-dimensional file, there are two types of partial match queries:row querieswhich access a row of grid blocks, andcolumn querieswhich access a column of grid blocks.Obviously, the theorem is true with respect to row queries since each grid block of a row isassigned to a distinct PN in GeMDA. We prove the theorem with respect to column queriesin the following.

To prove that all column queries are optimal, we need only show that all the elementsin the left-most column are distinct. If this is true, it is obvious that the elements of anycolumn are distinct. We prove this using thegroupconcept inabstract algebra[25].

TheN PN IDs (0, 1, · · · , N−1) forms the group of integers moduloN with the operationof addition modulo N. Let’s use the symbolZN to denote this group.

Page 21: GeMDA: A Multidimensional Data Partitioning Technique for Multiprocessor Database Systems

GeMDA: A MULTIDIMENSIONAL DATA PARTITIONING TECHNIQUE 231

Figure 11. Cosets and partitions.

In the 2DGeMDA algorithm, some of the grid rows are used as the check rows to deter-mine if the row under consideration needs to be shifted one additional position. These checkrows can be seen as dividing the 2-dimensional array into partitions(figure 11 illustrates thepartitions whenShf dist= 2. Since the rows of each partition (except the check row) areobtained by circular left shift of the row above it, the left-most columns of all the partitionsform thecosetsof 〈Shf dist〉 in ZN , where〈Shf dist〉 denotes a cyclic group generated byShf distwhich consists of the multiples of 1, added moduloShf dist. These cosets form thequotient group ZN/〈Shf dist〉 which contains all the different cosets of〈Shf dist〉 in ZN .Therefore, all the elements in the left-most column of the 2-dimensional array must bedistinct. 2

Theorem 1. GeMDA is optimal with respect to partial match queries.

Proof: We prove this theorem by showing that algorithmmD GeMDA is optimal. First,let’s consider partial match queries with only one unspecified attribute. Each of these queriescorresponds to a row or a column in some 2-dimensional plane of the hyperspace. Since thegrid blocks of each of these planes are allocated to PNs using algorithm 2DGeMDA, theallocation of these blocks must be optimal with respect to the respective row and columnqueries (according to Lemma 1). HencemD GeMDA must be optimal with respect to partialmatch queries with one unspecified attribute.

Next, we want to prove that ifmD GeMDA is optimal with respect to partial match querieswith k−1 (k> 1) unspecified attributes, then it is also optimal with respect to partial matchqueries withk unspecified attributes. Since each of thesek-dimensional hypercubes containskN possible(k − 1)-dimensional hypercubes, the optimal allocation of the grid blocks ofthese(k−1)-dimensional hypercubes implies the optimal allocation of the grid blocks of theencompassingk-dimensional hypercube. Thus, we have proved by induction that GeMDAis optimal with respect to all partial match queries. 2

Page 22: GeMDA: A Multidimensional Data Partitioning Technique for Multiprocessor Database Systems

232 LO, HUA AND YOUNG

Theorem 2. GeMDA is optimal with respect to km-hypercube queries, where m is thenumber of dimensions of the partitioning space, and k is the largest integer such thatkm < b m

√Ncm, i.e., k=b m

√Nc−1. (N is the number of PNs used to store this relation, or

the degree of declustering).

Proof: Let’s consider an arbitrarykm-hypercube query. LetF = (F1, F2, · · · , Fm) denotethe grid block in thekm hypercube such that its coordinates are less than or equal to thecorresponding coordinates of any other grid blocks, sayM = (M1,M2, · · · ,Mm), in thesame hypercube. That is,Fi ≤Mi for 1≤ i ≤m. On the contrary, letL = (L1, L2, · · · , Lm)

be the grid block in thekm hypercube such that its coordinates are larger than or equal tothe corresponding coordinates of any other grid blocks in the same hypercube. Then, wemust haveLi = Fi + k− 1 for 1≤ i ≤m. We will refer toF andL as thefirst and thelastgrid blocks of thekm hypercube, respectively. 2

The mapping function for GeMDA shown in Equation (1) can be rewritten as follows:

GeMDA(X1, X2, . . . , Xm)= f (X1, X2, · · · , Xm) mod N,

where f (X1, X2, · · · , Xm)=∑m

i=2b Xi ·GCDiN c +∑m

i=1(Xi ·Shf disti ). We define thediffer-encebetween any two grid blocksX andY as:

diff (X,Y)= | f (X1, X2, · · · , Xm)− f (Y1,Y2, · · · ,Ym)|

Since functionf is strictly increasing in thekm hypercube, the maximum difference of thissmall hypercube can be computed as follows:

max(diff (X,Y))

= f (L1, L2, · · · , Lm)− f (F1, F2, · · · , Fm)

= f (F1+ k− 1, F2+ k− 1, · · · , Fm + k− 1)− f (F1, F2, · · · , Fm)

=[(⌊

(F2+ k− 1) ·GCD2

N

⌋+⌊(F3+ k− 1) ·GCD3

N

⌋+⌊(F4+ k− 1) ·GCD4

N

⌋+ · · · +

⌊(Fm + k− 1) ·GCDm

N

⌋)+ ((F1+ k− 1)+ (F2+ k− 1) · b m

√Nc+ · · ·

+ (Fm + k− 1) · b m√

Ncm−1)

]−[(⌊

F2 ·GCD2

N

⌋+⌊

F3 ·GCD3

N

⌋+⌊

F4 ·GCD4

N

⌋+ · · ·

+⌊

Fm ·GCDm

N

⌋)+ (F1+ F2 · b m

√Nc + F3 · b m

√Nc2+ · · ·

+ Fm · b m√

Ncm−1)

]

Page 23: GeMDA: A Multidimensional Data Partitioning Technique for Multiprocessor Database Systems

GeMDA: A MULTIDIMENSIONAL DATA PARTITIONING TECHNIQUE 233

= (F1+ k− 1− F1)

+(⌊

F2 ·GCD2

N+ (k− 1) ·GCD2

N

⌋−⌊

F2 ·GCD2

N

⌋+ (F2+ k− 1− F2) · b m

√Nc)

+(⌊

F3 ·GCD3

N+ (k− 1) ·GCD3

N

⌋−⌊

F3 ·GCD3

N

⌋+ (F3+ k− 1− F3) · b m

√Nc2

)+ · · ·

+(⌊

Fm ·GCDm

N+ (k− 1) ·GCDm

N

⌋−⌊

Fm ·GCDm

N

⌋+ (Fm + k− 1− Fm) · b m

√Ncm−1

)SinceShf disti =b m

√Nci−1 andGCDi = gcd(Shf disti , N), the maximum possible value

of GCDi is Shf disti wheni ≤m. We thus have:

max(diff (X,Y)) ≤ (k− 1)

+(⌊

F2 ·GCD2

N+ (k− 1) · b m

√Nc

N

⌋−⌊

F2 ·GCD2

N

⌋+ (k− 1) · b m

√Nc)

+(⌊

F3 ·GCD3

N+ (k− 1) · b m

√Nc2

N

⌋−⌊

F3 ·GCD3

N

⌋+ (k− 1) · b m

√Nc2

)+ · · ·+(⌊

Fm ·GCDm

N+ (k− 1) · b m

√Ncm−1

N

⌋−⌊

Fm ·GCDm

N

⌋+ (k− 1) · b m

√Ncm−1

)

Sincek=b m√

Nc−1, we have((k−1) · b m√

Nci )< N if i <m. Thus,(k−1)·b m√NciN < 1. This

implies that max(diff (X,Y)) is bounded above as follows:

max(diff (X,Y)) < (k− 1)

+(⌊

F2 ·GCD2

N+ 1

⌋−⌊

F2 ·GCD2

N

⌋+ (k− 1) · b m

√Nc)

+(⌊

F3 ·GCD3

N+ 1

⌋−⌊

F3 ·GCD3

N

⌋+ (k− 1) · b m

√Nc2

)

Page 24: GeMDA: A Multidimensional Data Partitioning Technique for Multiprocessor Database Systems

234 LO, HUA AND YOUNG

+ · · ·+(⌊

Fm ·GCDm

N+ 1

⌋−⌊

Fm ·GCDm

N

⌋+(k− 1) · b m

√Ncm−1

)= (k− 1)+ (1+ (k− 1) · b m

√Nc)+ (1+ (k− 1) · b m

√Nc2)

+ · · · + (1+ (k− 1) · b m√

Ncm−1)

= k · (1+ b m√

Nc + b m√

Nc2+ · · · + b m√

Ncm−1)

−1+ (1− b m√

Nc)+ (1− b m√

Nc2)+ · · · + (1− b m√

Ncm−1)

SinceN> 1 andi > 0 we have(1− b m√

Nci )<0. The above inequality becomes:

max(diff (X,Y)) < k · bm√

Ncm − 1

b m√

Nc − 1− 1

= (b m√

Nc − 1) · bm√

Ncm − 1

b m√

Nc − 1− 1

= b m√

Ncm − 2

< N

We note that for any two grid blocksX andY in thekm hypercube, if they have the sameGeMDA mapping, then the following condition must be true:

F(X1, X2, · · · , Xm) mod N= F(Y1,Y2, · · · ,Ym) mod N

⇒ diff (X,Y)= |F(X1, X2, · · · , Xm)− F(Y1,Y2, · · · ,Ym)| =n · N,

wheren is some integer greater than 0. Since we already proved that the maximum differencein this small hypercube is less thanN, the above condition can never be met. Thus, all thegrid blocks in this small hypercube must be assigned to distinct PNs. In other words, theexecution of thekm-hypercube query is optimal. 2

References

1. K.A.S. Abdel-Ghaffar and A.E. Abbadi, “Optimal disk allocation for partial match,” ACM Trans. on DatabaseSystems, vol. 18, no.1, pp. 132–156, 1993.

2. H.Boral, W. Alexander, L. Clay, G. Copeland, S. Danforth, M. Franklin, B. Hart, M. Smith, and P. Valduriez,“Prototyping Bubba, a highly parallel database system,” IEEE Trans. on Knowledge and Data Engineering,vol. 2, no. 1, pp. 4–24, 1990.

3. L.T. Chen and D. Rotem, “Declustering objects for visualization, ” in Proc. of Int’l Conf. on VLDB, pp.85–96, Dublin, Ireland, August 1993.

4. G. Copeland, W. Alexander, E. Boughter, and T. Keller, “Data placement in bubba,” in Proc. of the 1988SIGMOD Conf., Chicago, Illinois, June 1988, pp. 99–108.

Page 25: GeMDA: A Multidimensional Data Partitioning Technique for Multiprocessor Database Systems

GeMDA: A MULTIDIMENSIONAL DATA PARTITIONING TECHNIQUE 235

5. D. DeWitt, S. Ghandeharizadeh, D. Schneider, A. Bricker, H. Hsiao, and R. Rasmussen, “The Gamma databasemachine project,” IEEE Trans. on Knowledge and Data Engineering, vol. 2, no. 1, pp. 44–62, 1990.

6. H.C. Du and J.S. Sobolewski, “Disk allocation for cartesian product files on multiple disk systems,” ACMTrans. on Database Systems, vol. 7, no. 1, pp. 82–101, 1982.

7. S. Englert, J. Gray, T. Kocher, and P. Shah, “A benchmark of NonStop SQL release 2 demonstrating near-linearspeedup and scaleup on large databases”, in SIGMETRICS90, May 1990, pp. 245–246.

8. C. Faloutsos and P. Bhagwat, “Declustering using fractals,” in Proc. of the Int’l Conf. on Parallel and DistributedInformation Systems, San Diego, California, January 1993, pp. 18–25.

9. C. Faloutsos and D. Metaxas, “Disk allocation methods using error correcting codes,” IEEE Trans. on Com-puters, vol. c-40, no. 8, pp. 907–914, 1991.

10. C. Faloutsos and S. Roseman, “Fractals for secondary key retrieval,” in Proc. of the 8th ACM Symposium onPrinciples of Database Systems, March 1989, pp. 247–252.

11. H. Frehatosmanoglu, D. Agrawal, and A. E. Abbadi, “Concentric hyperspaces and disk allocation for fastparallel ranges earching,” in Proc. of the 15th Int’l Conf. on Data Engineering., April 1999, pp. 608–615.

12. S. Ghandeharizadeh and D. Dewitt, MAGIC—a multi-attribute declustering mechanism for multiprocessordatabase machines. Transactions on Parallel and Distributed Systems, vol. 5, no. 5, pp. 509–524, 1994.

13. S. Ghandeharizadeh, D. DeWitt, and W. Qureshi, “ A performance analysis of alternative multi-attributedeclustering strategies, in Proc. of the ACM SIGMOD Int’l Conf. on Manegament of Data, San Diego,California, June 1992, pp. 29–38.

14. S. Ghandeharizadeh, R. Meyer, and G. Schultz, “Optimal balanced assignments and a parallel databaseapplication,” Computer Science Technical Report, University of Wisconsin-Madison, December 1990.

15. K.A. Hua and C. Lee,“ An adaptive data placement scheme for parallel database computer systems ” in Proc.of 16th Int’l Conf. on VLDB, Brisbane, Australia, August 1990, pp. 493–506.

16. K.A. Hua, Y.L. Lo, and H.C. Young, “Optimizer-assisted load balancing techniques for multicomputerdatabase management systems,” Journal of Parallel and Distributed Computing, vol. 25, no. 1, pp. 42–57,1995.

17. K.A. Hua and H.C. Young, “Designing a highly parallel database server using off-the-shelf components,” inProc. of The Int’l Computer Symp., Hsinchu, Taiwan, December 1990, pp. 47–54.

18. H.V. Jagadish, “Linear clustering of objects with multiple attributes,” in Proc. of ACM SIGMOD Conf.,Atlantic City, New Jersey, May 1990, pp. 332–342.

19. M.H. Kim and S. Pramanik, “Optimal file distribution for partial match retrieval,” in Proc. of ACM SIGMODConf., Chicago, Illinois, june 1988, pp. 173–182.

20. M. Kitsuregawa, H. Tanaka, and T. Moto-oka, “Application of hash to database machine and its architecture,”New Generation Computing, vol. 1, no. 1, pp. 66–74, 1983.

21. C. Lee and K.A. Hua, “A self-adjusting data distribution mechanism for multidimensional load balancing inmultiprocessor-based database systems,” Information Systems, vol. 19, no. 7, pp. 549–567, 1994.

22. R.A. Lorie, J.J. Daudenarde, J.W. Stamos, and H.C. Young, “Exploiting database parallelism in a message-passing multiprocessor,” IBM Journal of Research and Development, vol. 35, no. 5/6, pp. 681–695, 1991.

23. J. Nievergelt, H. Hinterberger, and K.C. Sevcik, “The grid file: An adaptive symmetric multikey file structure,”ACM Trans. on Database Systems, Vol. 9, No. 1, pp. 38–71, 1984.

24. M. Ozsu and P. Valduriez, Principles of Distributed Database Systems, Prentice-Hall: Englewood Cliffs, NewJersey, 1991.

25. C.C. Pinter, A Book of Abstract Algebra, chapter 15, Mc Graw-Hill: New York, NY, 1982.26. S. Prabhakar, K. Abdel-Ghaffar, D. Agrawal, and A. El Abbadi, “Cyclic allocation of two-dimensional data,”

in Proc. of the 14th Int’l Conf. on Data Engineering., Orlando, Florida, February 1998, pp. 94–101.27. S. Pramanik, D. Kao, and D. Vineyard, “Fragmentation of recursive relations in distributed databases,” in

Proc. of Advances in Database Technology (EDBT’92), Springer-Verlag, 1992, pp. 389–404.28. R.L. Rivest, “Partial-match retrieval algorithms,” SIAM J. Computing, vol. 15, no. 1, pp. 19–50, 1976.29. S. Shekhar, Y. Zhou, and M. Coyle, “ Disk allocation methods for parallelizing grid files,” in Proc. of Int’l

Conf. on Data Engineering, Houston, Texas, 1994, pp. 243–252,30. D. Shin and K. Irani, “Fragmenting relations holizontally using a knowledgebase approach,” IEEE TOSE,

vol. 17, no. 9, pp. 872–883, 1991.31. M. Stonebraker, “The case for shared nothing. IEEE Database Engineering,” vol. 9, no. 1, pp. 4–9, 1986.

Page 26: GeMDA: A Multidimensional Data Partitioning Technique for Multiprocessor Database Systems

236 LO, HUA AND YOUNG

32. S.Y.W. Su, “A microcomputer network system for distributed relational databases: Design, implementation,and analysis,” Journal of Telecommunication Networks, vol. 2, no. 3, pp. 307–334, 1983.

33. Teradata Corporation, Los Angeles, California, Teradata DBC/1012 Data Base Computer Concepts and Fa-cilities, release 3.1 edn., 1988, Teradata Document C02-0001-05.

34. X. Zhou, Y. Zhang, and M.E. Orlowska, “A new fragmentation scheme for recursive query processing,” Dataand Knowledge Engineering, vol. 13, pp. 177–192, 1994.