Assume that we have an SqL query containing joins and a group-by. The standard way of evaluating this type of query is t o first perform all the joins and then the group-by operation. However, it may be possible t o perform the group-by early, that is, to push the groupby operation past one or more joins. Early grouping may reduce the query processing cost by reducing the amount of data participating in joins. W e formally define the problem, adhering strictly t o the semantics of NULL and duplicate elimination in SqLQ and prove necessary and suficient conditions for deciding when this transfownation is valid. In practice, it may be ezpensive OT even impossible to test whether the conditions are satisfied. Therefore, we also present a more practical algorithm that tests a simpler, suficient condition. This algorithm is fast and detects a large subclass of transformable queries.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.