1. A method for optimizing a database query, the method comprising: generating a query plan for the database query, wherein the query plan includes first and second subplans; retrieving cached optimization data associated with the first subplan and generated during evaluation of another query plan for a previous query that uses the first subplan; evaluating the first subplan for resource cost using the retrieved optimization data; evaluating the second subplan for resource cost; and evaluating the query plan for resource cost based upon the evaluations of resource cost for the first and second subplans.