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 BONNEFILLE Guilhem <gu...@c-s.fr> on 2011/04/14 18:58:10 UTC

Reducing disk footprint with compression (gzip?)

Hi,

I'm completly new to this list, so I hope you will be patient with me.

We are using Derby in a sort of bi-dimensionnal database. Database's  
schema is the following:
* a blob (around 100 bytes)
* a timestamp
* an identifier.
The use case is:
* a single continuous input source,
* many parallel requests, time oriented for a given list of  
identifiers, to extract chunk of database.

Currently, performances are quite good.

The matter occurs with disk footprint: disk usage is too heavy.

One solution to reduce this is to modify the schema (a little bit more  
complex than what I described above).

An other solution is to compress (gzip) old part of history as we  
never need to update them.

Is it possible to do this with Derby?
Do you have any other tips when faced to this use case?
Any other (embedded) database that best matches our needs?

Thanks for your answer.

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.



Re: Reducing disk footprint with compression (gzip?)

Posted by "Dag H. Wanvik" <da...@oracle.com>.
BONNEFILLE Guilhem <gu...@c-s.fr> writes:

> An other solution is to compress (gzip) old part of history as we
> never need to update them.
>
> Is it possible to do this with Derby?

Derby doesn't have any built-in compression facilities. You say you
don't perform updates (or deletes), so presumingly there are no holes in
your database files, so running compression wouldn't help[1].

Some ideas: Could you compress the lob contents before you insert them
into the database and uncompress on retrieval? Could you store the lobs
as compressed files and just let the database reference them? Did you
consider a compressing file system?

Thanks,
Dag

[1]
http://db.apache.org/derby/docs/10.7/ref/rrefaltertablecompress.html
http://db.apache.org/derby/docs/10.7/ref/rrefproceduresinplacecompress.html


> Do you have any other tips when faced to this use case?
> Any other (embedded) database that best matches our needs?
>
> Thanks for your answer.
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.