Interchanging group-by and join in distributed query processing

  • Authors:
  • Weipeng Paul Yan

  • Affiliations:
  • University of Waterloo, Waterloo, Ontrio

  • Venue:
  • CASCON '93 Proceedings of the 1993 conference of the Centre for Advanced Studies on Collaborative research: distributed computing - Volume 2
  • Year:
  • 1993

Quantified Score

Hi-index 0.00

Visualization

Abstract

In previous work we have shown that the order of evaluating join and group-by can be interchanged in an SQL query under certain conditions. In many cases, performing group-by before join is a better way of evaluating the query. However, queries do exist for which it is better to perform join before group-by. When the conditions for interchanging the order of join and group-by for an SQL query are satisfied, the evaluation order should be determined mainly by the objective function of the query processor. This paper shows that the conditions can be used for estimating the cost of the two alternative evaluation plans in distributed query processing; specifically, estimating the cardinalities of the results of joins in the two alternative plans. It also proposes some strategies for deciding the direction of the transformation and a procedure for deciding the evaluation order of join and group-by for a distributed query.