Patent ID: 7177885

Claim:
A method of reorganizing a tablespace in a database comprising: reading a row of data from a database having a plurality of rows; (a) analyzing the row of data read out from the database; (b) determining whether to eliminate or retain the row of data based on at least one predetermined rule; (c) reloading the row of data into the database when it is determined that the row of data complies with the at least one predetermined rule; (d) eliminating the row of data when it is determined that the row of data does not comply with the at least one predetermined rule; and (e) rebuilding an index related to the database to include keys that correspond to the reloaded row of data; performing steps (b) through (e) for each of the plurality of rows; and wherein each of steps (b) through (e) are completed with respect to any particular row of the plurality of rows before any of steps (b) through (e) are performed with respect to a next row of the plurality of rows.