db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Matrigali <mikem_...@sbcglobal.net>
Subject Re: question about deleting clob should reclaim disk space like blob
Date Wed, 12 May 2010 21:47:37 GMT
My comments apply to database size as is measured by the files stored
in the seg0 directory.  It looks like your test includes the log 
directory.  Space reclamation of files in the log directory is 
orthogonal to space reclamation in the seg0 directory and trying
to understand the sum of these 2 is confusing.

The default for the files in the log directory is that each file 
represents a piece of an ever appended transaction log.  When a
checkpoint happens (internal systems determine when this happens),
then the system figures out which of the older files are no longer
needed to properly recover and roll forward the current transactions
and those are deleted.  If the system has enabled the backup with
rollfoward option then these files are not deleted until the user
executes an explicit new backup command that allows the older files
to be deleted.

The expected behavior of files in the seg0 directory is that space is
never returned to the OS after deleting rows in a table, until the user
executes one of the compress commands.  Deleted row space may be used
by subsequent inserts to the same table.  Also not part of this test, 
but space of dropped tables will also be returned to the OS.

Lily Wei wrote:
> Hi There:
>   I am seeing delete clob data from a table does not reclaim the disk 
> space. The same behavior does not happen to blob. For Blob, after 
> delete, the database size will decrease. However, for Clob, after 
> delete, the database size remaind the same. If we check the compression 
> space after delete clob using SYSCS_UTIL.SYSCS_INPLACE_COMPRESS_TABLE, 
> the size is smaller after delete clob rows. And, this is the same with blob.
>    Is this a bug or expected behavior?
>    I am attaching the repro for you to review.
>    Note the output indicate the databaseSize() did not change after 
> delete clob data from TAB table:
> ===========================
> The database size: 11494963
> delete rows from TAB
> The database size: 11494963

View raw message