Re: Data Deletion in Informix
Posted in 1994
Alan wrote: >If I have done a mass deletion on tables, when I do a tbstat -d , I don't see >the space being free up. Is it the space was free logically but not >physically ?? Alan, the answer to your question is that when you perform a mass delete on a Informix table, the tablespace in which the table was in has the free pages. In other words, if table a has 1000 rows and takes up 500 pages (50 of which are still free), when you delete 900 rows, the table still takes up 500 pages but with 475 free. You can verify this by doing a "tbcheck -pT databasename:tablename" and saving this output. Then delete your rows, and do the same statement over. You will see the amount of free pages which the table has reclaimed. In Informix, once a table grabs another extent of space, that extent is no longer available to the rest of the database. If you wish to reclaim free space and give it back to the chunk/dbspace, then you could unload the rows you wish to keep to a file; drop the table (this is the only way to return free pages to the chunk); re-create the table; and load the rows back into it. The "tbstat -d" command will give you the free pages in each chunk, not the free pages in each tablespace. I hope this has been helpful! Tracy W. Nedd National Weather Service vball@skipper.ssmc.noaa.gov