11. A system for updating database statistics for use in generating query execution plans, the system comprising: a database; a first store comprising statistics associated with a table in the database; a second store comprising a first entry with statistics associated with the table in the database; and a compiler in communication with the database and with at least the first store, the compiler being configured for receiving queries for the table in the database, accessing statistics for compiling each query from at least the first store, and generating at least one query execution plan for executing each query, wherein the compiler is further configured to: determine whether valid and updated statistics for compiling a first query are available from the first store; if valid and updated statistics for compiling the first query are not available from the first store, obtain updated statistics from the second store; and store the obtained updated statistics associated with the table in the database in the first store as a second entry, thereby storing multiple entries for the statistics associated with the same table in the database, wherein the first store is a metadata cache and the second store is a temporary cache.
12. The system of claim 11 , wherein the compiler is further configured to obtain updated statistics from the second store by causing the updated statistics to be loaded from the second store into the first store, and retrieving the updated statistics from the first store.