Computer program product for choosing largest selectivities among eligible predicates of join equivalence classes for query optimization
First Claim
1. A computer program product for use in a query optimizer in a relational database computer system wherein selectivity values for each eligible join predicate are known comprising:
- a recording medium;
means, recorded on said recording medium, for instructing said computer system to determine the equivalence classes for a plurality of join attributes; and
means, recorded on said recording medium, for instructing said computer system, for each equivalence class to;
1) determine the eligible join predicates belonging to each of said equivalence classes; and
2) choose the largest selectivity among said eligible join predicates in each of said equivalence classes.
0 Assignments
0 Petitions
Accused Products
Abstract
A method for choosing join selectivities in a query optimizer in a relational database management system is disclosed which facilitates the estimation of join result sizes by a query optimizer in a relational database system, wherein a new relation R is to be joined with an intermediate relation I, and wherein the selectivity values for each eligible join predicate are known. The method has the steps of determining the equivalence classes for a plurality of join attributes and then computing for each relation an estimate of the cardinality and the number of distinct values in each attribute after all the local predicates have been included. These are used in further computation of join selectivities and join result sizes. The join predicates must then be processed by correctly choosing the join selectivities. The join result sizes can then be correctly calculated.
58 Citations
1 Claim
-
1. A computer program product for use in a query optimizer in a relational database computer system wherein selectivity values for each eligible join predicate are known comprising:
-
a recording medium; means, recorded on said recording medium, for instructing said computer system to determine the equivalence classes for a plurality of join attributes; and means, recorded on said recording medium, for instructing said computer system, for each equivalence class to; 1) determine the eligible join predicates belonging to each of said equivalence classes; and 2) choose the largest selectivity among said eligible join predicates in each of said equivalence classes.
-
Specification