1. A method for optimizing a database query on a computer, 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, wherein the cached optimization data does not include cached query results, and wherein the cached optimization data is generated during evaluation of another query plan for a previous database query for which only partial optimization is completed and a portion of statistics collection for the other query plan is deferred; evaluating by the hardware-implemented processor on the computer the first subplan for resource cost using the retrieved optimization data; evaluating by the hardware-implemented processor on the computer the second subplan for resource cost; and evaluating by the hardware-implemented processor on the computer the query plan for resource cost based upon the evaluations of resource cost for the first and second subplans.