You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Grégoire Dubois <gr...@online.fr> on 2005/09/01 15:24:03 UTC

BLOB suppression : can't recover disk space

Hi all,

I inserted a 700Mo file into a blob (using embedded jdbc driver).

Then I use the command DELETE to delete the blob from the database. The
blob is well removed. But the disk space isn't recovered. 

Is there a command that permits the recovery of disk space when using
blobs?

Thank you very much.
Grégoire


Re: BLOB suppression : can't recover disk space

Posted by Mike Matrigali <mi...@sbcglobal.net>.
please search mail lists/manual with respect to space reclamation.

Derby stores each table and index in a separate file.  Once it
uses the disk space in a file it never automatically gives it
back to the OS.  Subsequent inserts should reuse the space
released by the delete of the file in the same file, so if you
insert another 700mb file into the table the file should not
grow - assuming enough time has elapsed for the background
threads to reclaim the space and that the delete was committed.

By hand you can reclaim the space by running the following:
http://db.apache.org/derby/docs/10.1/ref/rrefaltertablecompress.html

note that insert will also log the 700mb into the transaction log
so you will use that disk space also.

Grégoire Dubois wrote:

> Hi all,
> 
> I inserted a 700Mo file into a blob (using embedded jdbc driver).
> 
> Then I use the command DELETE to delete the blob from the database. The
> blob is well removed. But the disk space isn't recovered. 
> 
> Is there a command that permits the recovery of disk space when using
> blobs?
> 
> Thank you very much.
> Grégoire
> 
> 

Re: BLOB suppression : can't recover disk space

Posted by Rajesh Kartha <ka...@Source-Zone.Org>.
Grégoire Dubois wrote:

>Hi all,
>
>I inserted a 700Mo file into a blob (using embedded jdbc driver).
>
>Then I use the command DELETE to delete the blob from the database. The
>blob is well removed. But the disk space isn't recovered. 
>
>Is there a command that permits the recovery of disk space when using
>blobs?
>
>Thank you very much.
>Grégoire
>
>  
>
Hi Grégoire,

Here is some info about reclaiming unused space using

SYSCS_UTIL.SYSCS_COMPRESS_TABLE

http://db.apache.org/derby/docs/10.1/adminguide/cadminspace21579.html

This is from the Derby documentation.

Regards,
Rajesh