1. A computer implemented method for optimizing database transactions, comprising: receiving a query, the query specifying (i) a set of predicates supplied to the query and (ii) a minimal number of predicates in the set to be satisfied for a data record to be returned in a query result set; forming a bitwise predicate pattern for each of one of the specified predicates, including forming a unique set of bits for each one of the bitwise predicate patterns, each of the sets of bits having the same number of bits and having only one of the bits turned ON, such that each one of the bitwise predicate patterns uniquely represents a respective one of the predicates, and including forming the set of bits for each one of the bitwise predicate patterns such that the bit that is ON in a set of bits indicates which one of the predicates corresponds to which one of the bitwise predicate patterns; generating a logical expression using the sets of bits of the bitwise predicate patterns; performing operations on the logical expression to optimize the query, thereby producing an optimized query; using the optimized query on a repository stored in a computer readable storage medium to find a set of results satisfying the minimal number of predicates; and rendering the set of results satisfying the minimal number of predicates.