1. A method for updating database statistics for use in generating query execution plans, comprising: receiving a first query for a table in a database; determining whether valid and updated statistics for compiling the first query are available from a first store comprising a first entry with statistics associated with the table in the database; if valid and updated statistics for compiling the first query are not available from the first store, obtaining updated statistics from a further store comprising statistics associated with the table in the database; and storing 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 further store is a temporary cache.