Unix Technical Forum

Delete BLOBs but chunk space not freed

This is a discussion on Delete BLOBs but chunk space not freed within the Informix forums, part of the Database Server Software category; --> Quick question: I have a simple database with a table that has a BLOB field. There are no blobspaces. ...


Go Back   Unix Technical Forum > Database Server Software > Informix

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-19-2008, 10:29 PM
John Hardin
 
Posts: n/a
Default Delete BLOBs but chunk space not freed

Quick question:

I have a simple database with a table that has a BLOB field. There are no
blobspaces.

When I delete a row from the table with the BLOB field, the space used in
the chunk as reported by onstat -d does not go down.

Is space permanently allocated to BLOBs when you don't have a blobspace
for them?

--
John Hardin KA7OHZ <johnh@aproposretail.com>
Internal Systems Administrator voice: (425) 672-1304
Apropos Retail Management Systems, Inc. fax: (425) 672-0192
-----------------------------------------------------------------------
Failure to plan ahead on someone else's part does not constitute an
emergency on my part.
- David W. Barts in a.s.r

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-19-2008, 10:29 PM
Jonathan Leffler
 
Posts: n/a
Default Re: Delete BLOBs but chunk space not freed

John Hardin wrote:

> Quick question:
>
> I have a simple database with a table that has a BLOB field. There are no
> blobspaces.
>
> When I delete a row from the table with the BLOB field, the space used in
> the chunk as reported by onstat -d does not go down.
>
> Is space permanently allocated to BLOBs when you don't have a blobspace
> for them?


No, but it is permanently allocated to the table - until you alter its
fragmentation, or alter an index to cluster, or do an alter table that
cannot be done in place.


--
Jonathan Leffler #include <disclaimer.h>
Email: jleffler@earthlink.net, jleffler@us.ibm.com
Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org/

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-19-2008, 10:29 PM
scottishpoet
 
Posts: n/a
Default Re: Delete BLOBs but chunk space not freed

This is expected behaviour. The space is allocated to the "tablespace"
in extents, not on a per row basis. Space is not freed up from the
tablespace as data is deleted.

Extents are generally bigger than 1 row, but space isn't even freed up
when a whole exetnt is empty

The theory is that the table will probably need this space again,
tables generally don't shrink.So to save time allocating the space to
the table again later Informix doesn't remove it.

If you have run a large delete and do want to reclaim the tablespace
that was allocated to the table, if you cluster one of your indexes so
that the data is physically re ordered then this will free up the
unused space.

Most if not all of this is covered in the Informix System
Administrators Course, which I would recommend if you have not already
been on it.


"John Hardin" <johnh@aproposretail.com> wrote in message news:<pan.2004.05.21.23.53.39.40504@aproposretail. com>...
> Quick question:
>
> I have a simple database with a table that has a BLOB field. There are no
> blobspaces.
>
> When I delete a row from the table with the BLOB field, the space used in
> the chunk as reported by onstat -d does not go down.
>
> Is space permanently allocated to BLOBs when you don't have a blobspace
> for them?

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:47 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com