Re: free up disk space
Posted in 1997
Wendy, The answer to your question, depends on the use of the table. What I mean is that the "Create cluster" or "Alter index to cluster" statements will rebuild the table, compacting all rows and freeing disk space taken up by deleted rows while the table is still active and available for applications. As a side note, is it a hold cursor, scroll cursor, or regular cursor? This matters greatly when considering the locking of rows. In some cases though, freeing up the disk space is the wrong thing to do. In highly active tables, what one really wants is to make a large first extent. One that is large enough to hold the entire table before your nightly deletes. Then when you delete and add from then on, you are still in the non-fragmented tablespace. If you freed that space after your deletion, then Informix would need to allocate one or more additional extents when it started inserting new records. This could lead to a performance problem if extensive fragmentation occurred. I hope this has been of some help! Tracy p.s. To get that large extent, you might have to alter the extent size, then cluster, but you should only have to do this once. > > Dear Informixers, > > I have a problem: > How to free up extents that have been allocated to tables > without restarting application that has cursor defined on the tables? > > We are using Online 5.0 on HP-UX. The datababase is to record > some kind of daily activity. The data is accumulated but only some > recent data should be kept. Old data is deleted everyday. > > I have found even the data is deleted, the disk space is > not freed for others to use. I realized that reload the table or > even create a cluster index will help the free space to actually > be freed. But applications that uses the table in some cursor will > have to be restarted, that is not possible. > > Could somebody help me to solve this problem: > How to free disk space with out affect the cursor that has been defined > for the tables? > > Thanks in advance! > > Wendy > -- ========================================================================= = Tracy W. Nedd = = Banctec Inc. - DBA = = Silver Spring, Md = = tracyn@banctec.clark.net or tracyn@asd.banctec.com = ========================================================================= = ALL RIGHTS RESERVED. = = This posting is copyright and may be used only for the purposes = = of professional study, or the professional exchange of information. = = Use of this posting by any commercial organization for the purposes = = of vilifying another is explicitly prohibited. = =========================================================================