after delete of rows is space immediately availabl
Posted in 2008
Topics: Versions, Editions & End-of-Life
Hey everyone. Simple question about IDS 9.4. After a process does a delete of X numbers of table rows........does the deleted rows become freespace immediately? or is there some other action that needs to be done to make that space immediately available? Thanks
Hi, the space is immediately available (after committing the delete) - for that same table, that is. This is because the deleted rows were in extents that have been allocated for that particular table. The space that was occupied by the deleted rows in these extents is free, but it remains in those extents and the extents remain allocated by the table. In short: - If you want to use the freed space for updates or inserts within the same table - no problem. - If you want to use the space elsewhere (other table or even other database), then you first have to re-organize the table to free the allocated extents. If necessary there should be lots of information available about table re-organization ... Regards, Martin -- Martin Fuerderer IBM Informix Development Munich, Germany Information Management IBM Deutschland Entwicklung GmbH Chairman of the Supervisory Board: Martin Jetter Board of Management: Herbert Kircher Corporate Seat: Boeblingen, Germany Reg.-Gericht: Amtsgericht Stuttgart, HRB 243294 ids-bounces@iiug.org wrote on 05.03.2008 17:44:32: > Hey everyone. Simple question about IDS 9.4. After a process does a delete of > X numbers of table rows........does the deleted rows become freespace > immediately? or is there some other action that needs to be done to make that > space immediately available? Thanks > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > See you at the IIUG Informix 2008 Conference > The Power Conference for Informix Professionals > April 27 - 30, 2008 Marriott Overland Park (Kansas City), Kansas > http://www.iiug.org/conf > Registration Now Open!!
True in concept, but there is an intermediate step. The pointer on each page
remains pointing at the end of the page until enough rows have been deleted
from the page and the engine determine that the page can be "compress"ed - all
rows re-written starting at the beginning of the page - at which time the
pointer is moved back into the page and the page is noted as a page with
available space in the free list. The number of these operations can be seen
in onstat -p output. So if are out of space in a table, and you delete one
small row - no you will not be able to put one new small row in.
There are some holes in my understanding of this. 1) at what percentage of
deleted rows is the page a candidate for compression? 2) Does this compression
occur on the last delete or does something else happen? This last because I
have seen pages compress even when there are no active deletes occurring -
which implies that the engine waited until it read the page again to decide
that it could be compressed.
j.
>From: Martin Fuerderer <MARTINFU@de.ibm.com>
>Date: 2008/03/05 Wed AM 10:52:56 CST
>To: ids@iiug.org
>Subject: Re: after delete of rows is space immediately .... [11492]
>Hi,
>
>the space is immediately available (after committing the
>delete) - for that same table, that is.
>
>This is because the deleted rows were in extents that have
>been allocated for that particular table. The space that was
>occupied by the deleted rows in these extents is free, but
>it remains in those extents and the extents remain allocated
>by the table.
>
>In short:
>- If you want to use the freed space for updates or
>inserts within the same table - no problem.
>- If you want to use the space elsewhere (other table
>or even other database), then you first have to
>re-organize the table to free the allocated extents.
>
>If necessary there should be lots of information available
>about table re-organization ...
>
>Regards,
>Martin
>--
>Martin Fuerderer
>IBM Informix Development Munich, Germany
>Information Management
>
>IBM Deutschland Entwicklung GmbH
>Chairman of the Supervisory Board: Martin Jetter
>Board of Management: Herbert Kircher
>Corporate Seat: Boeblingen, Germany
>Reg.-Gericht: Amtsgericht Stuttgart, HRB 243294
>
>ids-bounces@iiug.org wrote on 05.03.2008 17:44:32:
>
>> Hey everyone. Simple question about IDS 9.4. After a process does a
>delete of
>> X numbers of table rows........does the deleted rows become freespace
>> immediately? or is there some other action that needs to be done to make
>that
>> space immediately available? Thanks
>>
>>
>>
>
>*******************************************************************************
>> Forum Note: Use "Reply" to post a response in the discussion forum.
>>
>> See you at the IIUG Informix 2008 Conference
>> The Power Conference for Informix Professionals
>> April 27 - 30, 2008 Marriott Overland Park (Kansas City), Kansas
>> http://www.iiug.org/conf
>> Registration Now Open!!
>
>
>*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>See you at the IIUG Informix 2008 Conference
>The Power Conference for Informix Professionals
>April 27 - 30, 2008 Marriott Overland Park (Kansas City), Kansas
>http://www.iiug.org/conf
>Registration Now Open!!
I believe the comments below are mixing up many topics. In short I
disagree
with many of the comments below and yes, if you delete a row from a pag=
e
the space is immediately available.
In a table with fixed length rows, if you delete a row from a page
then the space is immediately available for re-use. A new row will fit=
in
this
empty slot without any further magic.
In a table with variable length rows, it becomes a little more complica=
ted
and page compression may need to take place. Each page tracks the amou=
nt
of free spaces available. This free space could be in one contiguous b=
lock
or scattered
across the page. Upon insert a row and there does not exists a contigu=
ous
block
large enough to fit the new row , then we compress the page so all free=
space is
consolidated. Hence the row is inserted in this page.
Now how we choose which page to insert into next, is determined
by the bitmap pages and current insert point.
John
=
"vze2qjg5@verizon =
.net" =
<vze2qjg5@verizon =
To
.net> ids@iiug.org =
Sent by: =
cc
ids-bounces@iiug. =
org Subj=
ect
Re: Re: after delete of rows is =
space immediat.... [11495] =
03/05/2008 09:15 =
AM =
=
=
Please respond to =
ids@iiug.org =
=
=
True in concept, but there is an intermediate step. The pointer on each=
page
remains pointing at the end of the page until enough rows have been del=
eted
from the page and the engine determine that the page can be "compress"e=
d -
all
rows re-written starting at the beginning of the page - at which time t=
he
pointer is moved back into the page and the page is noted as a page wit=
h
available space in the free list. The number of these operations can be=
seen
in onstat -p output. So if are out of space in a table, and you delete =
one
small row - no you will not be able to put one new small row in.
There are some holes in my understanding of this. 1) at what percentage=
of
deleted rows is the page a candidate for compression? 2) Does this
compression
occur on the last delete or does something else happen? This last becau=
se I
have seen pages compress even when there are no active deletes occurrin=
g -
which implies that the engine waited until it read the page again to de=
cide
that it could be compressed.
j.
>From: Martin Fuerderer <MARTINFU@de.ibm.com>
>Date: 2008/03/05 Wed AM 10:52:56 CST
>To: ids@iiug.org
>Subject: Re: after delete of rows is space immediately .... [11492]
>Hi,
>
>the space is immediately available (after committing the
>delete) - for that same table, that is.
>
>This is because the deleted rows were in extents that have
>been allocated for that particular table. The space that was
>occupied by the deleted rows in these extents is free, but
>it remains in those extents and the extents remain allocated
>by the table.
>
>In short:
>- If you want to use the freed space for updates or
>inserts within the same table - no problem.
>- If you want to use the space elsewhere (other table
>or even other database), then you first have to
>re-organize the table to free the allocated extents.
>
>If necessary there should be lots of information available
>about table re-organization ...
>
>Regards,
>Martin
>--
>Martin Fuerderer
>IBM Informix Development Munich, Germany
>Information Management
>
>IBM Deutschland Entwicklung GmbH
>Chairman of the Supervisory Board: Martin Jetter
>Board of Management: Herbert Kircher
>Corporate Seat: Boeblingen, Germany
>Reg.-Gericht: Amtsgericht Stuttgart, HRB 243294
>
>ids-bounces@iiug.org wrote on 05.03.2008 17:44:32:
>
>> Hey everyone. Simple question about IDS 9.4. After a process does a
>delete of
>> X numbers of table rows........does the deleted rows become freespac=
e
>> immediately? or is there some other action that needs to be done to =
make
>that
>> space immediately available? Thanks
>>
>>
>>
>
>**********************************************************************=
*********
>> Forum Note: Use "Reply" to post a response in the discussion forum.
>>
>> See you at the IIUG Informix 2008 Conference
>> The Power Conference for Informix Professionals
>> April 27 - 30, 2008 Marriott Overland Park (Kansas City), Kansas
>> http://www.iiug.org/conf
>> Registration Now Open!!
>
>
>**********************************************************************=
*********
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>See you at the IIUG Informix 2008 Conference
>The Power Conference for Informix Professionals
>April 27 - 30, 2008 Marriott Overland Park (Kansas City), Kansas
>http://www.iiug.org/conf
>Registration Now Open!!
***********************************************************************=
********
Forum Note: Use "Reply" to post a response in the discussion forum.
See you at the IIUG Informix 2008 Conference
The Power Conference for Informix Professionals
April 27 - 30, 2008 Marriott Overland Park (Kansas City), Kansas
http://www.iiug.org/conf
Registration Now Open!!
=