1. An apparatus comprising: at least one processor; a memory coupled to the at least one processor; a database residing in the memory having data; a query optimizer residing in the memory that parses a query to identify a database table with a materialized query table (MQT) in deferred maintenance; and wherein the query optimizer autonomically determines whether to update the MQT in deferred maintenance by estimating a time to execute the query over a base table corresponding to the MQT in deferred maintenance, estimating a time to update the MQT in deferred maintenance, comparing the estimated time to update the MQT in deferred maintenance and the estimated time to execute the query over the base tables; and wherein the query optimizer updates the MQT in deferred maintenance where the estimated time to update the MQT is less than the time to execute the query; and executes the query over the updated MQT in deferred maintenance.