Unfortunately, it is not really practicable when this problem affects a significant number of complex queries in an application, where the relevent IN clause is a small part of a much larger query (which may have other parts that will degrade performance significantly if executed multiple times in the separate parts of the unions), and where the number of terms to the IN clause is completely variab