11. The computer system recited in claim 9 , wherein the processor is configured to: generate a heuristic query plan for the query; enumerate a heuristic query plan from a multijoin to generate a first plurality of substitutes for the multijoin; assign a potential to each of the first plurality of substitutes, wherein the potential represents a ranking based on a likelihood of producing a low cost query plan; and generate a query plan based on the assigned potential, the potential threshold, and the first plurality of substitutes.
11. The computer system recited in claim 9 , wherein the processor is configured to: generate a heuristic query plan for the query; enumerate a heuristic query plan from a multijoin to generate a first plurality of substitutes for the multijoin; assign a potential to each of the first plurality of substitutes, wherein the potential represents a ranking based on a likelihood of producing a low cost query plan; and generate a query plan based on the assigned potential, the potential threshold, and the first plurality of substitutes. 14. The computer system recited in claim 11 , wherein the query plan is generated by the processor being configured to: determine whether each of the first plurality of substitutes exceeds the potential threshold; select a subset of the first plurality of substitutes based on the determination; enumerate a second plurality of substitutes from the selected subset; and generate the query plan based on the enumeration of the second plurality of substitutes.