| CPC G06F 3/064 (2013.01) [G06F 3/0608 (2013.01); G06F 3/0652 (2013.01); G06F 3/0674 (2013.01)] | 18 Claims |

|
1. A computer-implemented method for efficient consolidation of record blocks in a database, the method comprising:
receiving, by a processor, a deletion record set for bulk data deletion from the database identified by executing an internal database procedure including querying an in-memory representation of the database for records that match certain conditions, and a set of record blocks, each record block comprising a set of records, wherein the bulk data deletion is performed without taking the database offline;
acquiring, by the processor, an exclusive lock for one or more of the records in the deletion record set, wherein the record block index has an access control mechanism which enables an atomic update of its contents;
consolidating, by the processor, one or more of the record blocks of the set of record blocks, wherein consolidating the one or more record blocks comprises processing, by the processor, each of the record blocks to determine records to keep and updating, by the processor, a list of records to keep, when processing each record the set of record blocks;
replacing, by the processor, existing records with current record by comparing a time stamp of the current record with a time stamp of the existing record:
deleting, by the processor, the existing record from the list of records to keep:
adding, by the processor, the current record to the list of records to keep:
updating, by the processor, an in-memory record block index; and
adding, by the processor, a transaction log entry for an updated record block index update, wherein the transaction log entry describes an ACID (atomic, consistent, isolated and durable) update to the database, wherein the updating the in-memory record block index and the adding transaction log entry for the undated record block index are performed in parallel.
|