Patent ID: 7574419

Claim:
A method, comprising: tracking a plurality of queries executing in a database system; selecting a query with a longest duration; determining an undo retention duration of the database system for supporting the longest query by examining a required undo retention time and a possible undo retention time, wherein the required undo retention time comprises a length of the longest query and a safety parameter which is determined by considering at least a time period of a query tuning process and latency in startup of the query tuning process. the act of determining the undo retention duration of the database system determines the undo retention duration to be a calculated retention time required to fill up a tablespace if the required retention time is determined to be less than the possible retention time; and displaying a result of the action of determining the undo retention duration on a display apparatus or storing the result in a tangible volatile or non-volatile computer readable medium or a storage device.