A method and apparatus for performing computationally intensive
calculations on a database server that provides a recovery mechanism is
provided. These calculations involve a series of updates performed on
data stored as data items in a database server. An existing recovery
mechanism of the database server is used to store previous versions of
the data items. The previous versions of the data items are subsequently
retrieved from the recovery mechanism and used to determine whether the
formula involved in the calculation should be modified, whether to
continue the calculations with the current formula, or whether to
terminate the calculations. By extending the functionality of the SELECT
statement, the program can access the previous versions of the data
items.