1. A machine-executed method comprising the steps of: receiving a particular query that includes a particular operator, wherein the particular operator is one of MINUS and INTERSECT; generating a plurality of transformed queries, wherein each query of said plurality of transformed queries is generated by rewriting the particular query using a different combination of one or more transformations, and wherein each query of said plurality of transformed queries, if executed, produces a same result as said particular query but does not include said particular operator; wherein each of the transformed queries comprises a different sequence of operators, and wherein at least one of the operators in each of the different sequences of operators eliminates duplicate values; generating cost estimates for the transformed queries in said plurality of transformed queries; comparing the cost estimate for one of the transformed queries to the cost estimate for another of the transformed queries; and selecting from said plurality of transformed queries a particular transformed query to execute based, at least in part, on the cost estimates, wherein each of said steps of said method is performed by one or more computing devices.