10. The computer system recited in claim 9 , wherein the strategy comprises a maximum pass parameter specifying a limit to a number of passes performed by a multi-pass optimizer, wherein the multi-pass optimizer optimizes the query.
9. A computer system for optimizing a query, comprising: a memory storing instructions; a processor configured to execute the instructions to: determine a cost estimate for a query; determine a budget for optimizing the query based on the cost estimate; determine a normalized complexity of the query; determine a strategy based on the normalized complexity and the budget, wherein the strategy comprises a potential threshold, wherein a portion of a search space that exceeds the potential threshold is not enumerated during optimization; and optimize the query based on the strategy.