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 Karl Weber <ka...@googlemail.com> on 2016/03/06 18:57:07 UTC
Re: Reclaim unused space, but how exactly?
Hi Bryan,
thank you for your answer. My problem is the following: You may think about a
table with a column (among others) that contains a large amount of
unstructured data. These data will to a large extent (but perhaps not
completely) be replaced by structured data (in some user defined data type) in
another column. This will reduce the space requirements considerably for each
particular row. This conversion of the data will be done only once and also
require the addition of one new column to the table in question. After this
conversion, the newly added rows will already have the data structured.
So my question is about what to do after this conversion in order to have no
disk space wasted.
Am Sonntag, 6. März 2016, 08:53:10 schrieb Bryan Pendleton:
> > I want to make the unused space availabe to derby for the insertion of new
> > rows. It should be optinal to give unused space back to the OS. In order
> > to do so, I have to use some system utility.
>
> I'm not totally sure whether the 5th word in the above line is "optional"
> or "optimal".
>
The word is optional. The point is, that the number of rows will further
increase, so there seems to be no point in giving the space back to the OS
after the conversion, derby will need this space later anyway. I just want to
make sure that disk space will be used efficiently after the conversion.
With kind regards
Karl
Re: Reclaim unused space, but how exactly?
Posted by Bryan Pendleton <bp...@gmail.com>.
> unstructured data. These data will to a large extent (but perhaps not
> completely) be replaced by structured data (in some user defined data type) in
> another column. This will reduce the space requirements considerably for each
> particular row.
Hi Karl, thanks for the follow-up.
As Myrna suggested, I wonder if it might be worth using two separate tables here.
First, insert the unstructured data into the first table.
Later, when the conversion to the structured form occurs, insert the
row (in its structured form) into the second table, and simultaneously
delete the row from the first table.
Over time, I'd expect Derby to successfully re-use the space in the first
table, and I'd expect Derby to successfully store the rows in the
second table in a compact way.
bryan