[ Informix Logo ] Архив интересных статей по Informix
Пред. по дате ] [ След. по дате ] [ Пред. по нити ] [ След. по нити ][ Индекс по датам ][ Индекс по нитям ]

Пересылка: does delete records free up dbspace?

From "Shulzhenko Vasyl" <vasilis@softline.kiev.ua>
Date Wed, 10 Feb 1999 21:05:01 +0200


-----Исходное сообщение-----
От: Art S. Kagel <kagel@bloomberg.net>
Группы: comp.databases.informix
Кому: Yan Zhu <yan.zhu@infinity-insurance.com>
Дата: 10 февраля 1999 г. 19:12
Тема: Re: does delete records free up dbspace?


>Yan Zhu wrote:
>>
>> hi all:
>>     I deleted a bunch of records from my database, around 1/3, but when
>> I do a onstat -d, the dbspace usage remain the same, how could that be?
>> if that's the case, how could I tell how full my database is at a given
>> time?
>>     thanks a lot. btw, i am running 7.22 with solaris 2.6
>> yan
>
>To recap the other responses and be more complete and concise:
>
>When you delete rows the space remains reserved for new rows and still
>belongs to the table it is not available for use by other tables but it
>will be reused by new rows inserted into the table to which it belongs.
>
>To determine the free space within a table use:
>
>'oncheck -pT database:tablename'
>
>To compress or defragment a table and free up unused pages allocated
>beyond the initial EXTENT SIZE value there are three options in order
>of speed and efficiency:
>
>1) ALTER FRAGMENT ON TABLE tablename INIT IN same_or_other_dbspace;
>2) ALTER INDEX indexname TO CLUSTER; (if already clustered first
>   ALTER INDEX indexname TO NOT CLUSTER; then recluster)
>3) unload the table's data, drop the table, recreate the table with
>  a new appropriate EXTENT and NEXT SIZE, reload the data (indexes not
>  needed for integrity should be created after the data is reloaded)
>
>You can ALTER TABLE MODIFY NEXT SIZE newsize; before 1) or 2) to change
>the size of any additional extents.  However if the initial EXTENT SIZE
>is too large and the table has permanently shrunk below its initial
>EXTENT SIZE setting only by doing 3) can you reduce the table's size
>below the original EXTENT SIZE.
>
>Hope this helps.
>
>Art S. Kagel



Home ] Сайт создан при поддержке Украинского представительства Informix Software Inc. Hosted by ANTEC