| CPC G06F 16/2246 (2019.01) [G06F 16/2282 (2019.01); G06F 16/24552 (2019.01)] | 18 Claims |

|
11. A non-transitory computer-readable medium having program instructions stored thereon that are capable of causing a computer system to perform operations comprising:
receiving a request to truncate a subrange of records, wherein the subrange of records is stored in physical storage, and wherein the request specifies a conditional expression that is usable to identify the subrange from other subranges of records of a database table;
before truncating the subrange, determining whether the subrange is capable of being truncated with a single-record subrange truncate operation, regardless of a size of the subrange, based on whether the conditional expression satisfies a set of preconditions, and wherein the subrange includes more than one record; and
based on determining that the conditional expression satisfies the set of preconditions, performing the single-record subrange truncate operation that includes generating a single truncate record that causes the subrange of records to be truncated from the database table such that:
subsequent queries to the single-record subrange truncate operation cannot access the subrange of records; and
the subrange of records is marked for subsequent purging from the physical storage; and
based on determining that the conditional expression does not satisfy the set of preconditions, generating a truncate record for each record included in the subrange of records that causes that record to be truncated from the database table.
|