16. An apparatus configured for performing multi-stage table updates, comprising: a processor; a receiving mechanism configured to receive a query at the processor for updating a table in a database; a sub-query-generating mechanism configured to generate a set of sub-queries responsive to a storage space needed for storing a transaction log associated with the received query the pre-determined threshold, wherein while generating the sub-queries, the sub-query-generating mechanism is configured to: identify partitions in the table; and for each partition: determine if a storage space needed for storing a transaction log associated with a sub-query corresponding to the partition exceeds the pre-determined threshold; if not, process the sub-query corresponding to the partition; and if so, divide the partition into multiple subsets such that a storage space needed for storing a transaction log associated with each sub-query corresponding to a subset is less than the pre-determined threshold.
16. An apparatus configured for performing multi-stage table updates, comprising: a processor; a receiving mechanism configured to receive a query at the processor for updating a table in a database; a sub-query-generating mechanism configured to generate a set of sub-queries responsive to a storage space needed for storing a transaction log associated with the received query the pre-determined threshold, wherein while generating the sub-queries, the sub-query-generating mechanism is configured to: identify partitions in the table; and for each partition: determine if a storage space needed for storing a transaction log associated with a sub-query corresponding to the partition exceeds the pre-determined threshold; if not, process the sub-query corresponding to the partition; and if so, divide the partition into multiple subsets such that a storage space needed for storing a transaction log associated with each sub-query corresponding to a subset is less than the pre-determined threshold. 18. The apparatus of claim 16 , further comprising: a mini-commit mechanism configured to perform a mini-commit operation for each sub-query; and a commit mechanism configured to perform a commit operation for the received query in response to mini-commit operations for all sub-queries being performed successfully, and to roll back the mini-commit operations for all sub-queries in response to a mini-commit operation for any sub-query being performed unsuccessfully.