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.