Patent ID: 8560500

Claim:
A method for removing rows from directory tables, comprising: creating an image copy of at least a portion of a database directory table, the database directory table not accessible using a delete operation; identifying a plurality of candidate rows to delete from the directory table by comparing each row of the image copy of the portion of the database directory table against one or more deletion criteria; deleting the plurality of candidate rows from the image copy to establish an updated image copy; during a first pass process on the database directory table, caching a plurality of spacemap pages, wherein the first pass process comprises a first table scan of the database directory table and the plurality of spacemap pages comprise an indication of available page space in the database directory table; and during a second pass process on the database table, applying the plurality of cached spacemap pages to the image copy of the portion of the database directory table, wherein the second pass process is performed after the first pass process and comprises a second table scan of the database directory table and wherein applying the cached space map page comprises determining if the spacemap pages are less than or equal to track modified pages.