costly join operation which is necessary in all the
other algorithms presented in the literature, thus we
reduce its Input/Output cost. It also helps us to avoid
the effect of data skew which may result from com-
puting the intermediate join results and from redis-
tributing all the tuples if AVS (Attribute Value Skew)
exists in the relation. In addition, we partially eval-
uate the aggregate function before redistributing the
data between processors or evaluating the join oper-
ation, because group-by and aggregate functions re-
duce the volume of data. To reduce the communica-
tion cost to minimum, we use the histograms to dis-
tribute only the tuples of the grouping result that will
effectively be present in the output of the join oper-
ation. This algorithm is proved to have a near-linear
speed-up, using the BSP cost model, even for highly
skewed data. Our experience with the join operation
(Bamha and Hains, 2000; Bamha and Hains, 1999;
Bamha and Hains, 2005) is evidence that the above
theoretical analysis is accurate in practice.
REFERENCES
Bamha, M. (2005). An optimal and skew-insensitive
join and multi-join algorithm for ditributed architec-
tures. In Proceedings of the International Confer-
ence on Database and Expert Systems Applications
(DEXA’2005). 22-26 August, Copenhagen, Dane-
mark, volume 3588 of Lecture Notes in Computer Sci-
ence, pages 616–625. Springer-Verlag.
Bamha, M. and Hains, G. (2000). A skew insensitive al-
gorithm for join and multi-join operation on Shared
Nothing machines. In the 11th International Confer-
ence on Database and Expert Systems Applications
DEXA’2000, volume 1873 of Lecture Notes in Com-
puter Science, London, United Kingdom. Springer-
Verlag.
Bamha, M. and Hains, G. (2005). An efficient equi-semi-
join algorithm for distributed architectures. In Pro-
ceedings of the 5th International Conference on Com-
putational Science (ICCS’2005). 22-25 May, Atlanta,
USA, volume 3515 of Lecture Notes in Computer Sci-
ence, pages 755–763. Springer-Verlag.
Bamha, M. and Hains, G. (September 1999). A frequency
adaptive join algorithm for Shared Nothing machines.
Journal of Parallel and Distributed Computing Prac-
tices (PDCP), Volume 3, Number 3, pages 333-345.
Appears also in Progress in Computer Research, F.
Columbus Ed. Vol. II, Nova Science Publishers, 2001.
Bisseling, R. H. (2004). Parallel Scientific Computation :
A Structured Approach using BSP and MPI. Oxford
University Press, USA.
Carter, J. L. and Wegman, M. N. (April 1979). Universal
classes of hash functions. Journal of Computer and
System Sciences, 18(2):143–154.
Chaudhuri, S. and Shim, K. (1994). Including Group-By in
Query Optimization. In Proceedings of the Twentieth
International Conference on Very Large Databases,
pages 354–366, Santiago, Chile.
Datta, A., Moon, B., and Thomas, H. (1998). A case for
parallelism in datawarehousing and OLAP. In Ninth
International Workshop on Database and Expert Sys-
tems Applications, DEXA 98, IEEE Computer Society,
pages 226–231, Vienna.
DeWitt, D. J. and Gray, J. (1992). Parallel database systems
: The future of high performance database systems.
Communications of the ACM, 35(6):85–98.
DeWitt, D. J., Naughton, J. F., Schneider, D. A., and Se-
shadri, S. (1992). Practical Skew Handling in Parallel
Joins. In Proceedings of the 18th VLDB Conference,
pages 27–40, Vancouver, British Columbia, Canada.
Hua, K. A. and Lee, C. (1991). Handling data skew in mul-
tiprocessor database computers using partition tuning.
In Lohman, G. M., Sernadas, A., and Camps, R., ed-
itors, Proc. of the 17th International Conference on
Very Large Data Bases, pages 525–535, Barcelona,
Catalonia, Spain. Morgan Kaufmann.
Seetha, M. and Yu, P. S. (December 1990). Effectiveness of
parallel joins. IEEE, Transactions on Knowledge and
Data Enginneerings, 2(4):410–424.
Shatdal, A. and Naughton, J. F. (1995). Adaptive paral-
lel aggregation algorithms. SIGMOD Record (ACM
Special Interest Group on Management of Data),
24(2):104–114.
Skillicorn, D. B., Hill, J. M. D., and McColl, W. F. (1997).
Questions and Answers about BSP. Scientific Pro-
gramming, 6(3):249–274.
Taniar, D., Jiang, Y., Liu, K., and Leung, C. (2000).
Aggregate-join query processing in parallel database
systems,. In Proceedings of The Fourth International
Conference/Exhibition on High Performance Comput-
ing in Asia-Pacific Region HPC-Asia2000, volume 2,
pages 824–829. IEEE Computer Society Press.
Taniar, D. and Rahayu, J. W. (2001). Parallel processing of
’groupby-before-join’ queries in cluster architecture.
In Proceedings of the 1st International Symposium on
Cluster Computing and the Grid, Brisbane, Qld, Aus-
tralia, pages 178–185. IEEE Computer Society.
Tsois, A. and Sellis, T. K. (2003). The generalized pre-
grouping transformation: Aggregate-query optimiza-
tion in the presence of dependencies. In VLDB, pages
644–655.
Valiant, L. G. (August 1990). A bridging model for par-
allel computation. Communications of the ACM,
33(8):103–111.
Wolf, J. L., Dias, D. M., Yu, P. S., and Turek, J. (1994).
New algorithms for parallelizing relational database
joins in the presence of data skew. IEEE Transactions
on Knowledge and Data Engineering, 6(6):990–997.
Yan, W. P. and Larson, P.-k. (1994). Performing group-by
before join. In Proceedings of the 10th IEEE Inter-
national Conference on Data Engineering, pages 89–
100. IEEE Computer Society Press.
PARALLEL PROCESSING OF ”GROUP-BY JOIN” QUERIES ON SHARED NOTHING MACHINES
307