Shrinking Database Files


These are questions asked in the context of the proposed architecture described in the forum thread titled, "Sample JDO Architecture for Follow Up Questions".


I thought I read something on the ObjectDB website (forum? 1.x manual?), which I cannot find now, that stated that the datastore file never shrinks when large number of objects are deleted and the only way to reclaim that space would be with Database Doctor.

Is there a way to reclaim database file space?

Is it worth trying to reclaim space?  (It may not be if it is a lengthy operation, or it tends to make the file more fragmented with subsequent use, or if space reclaimed is minimal, etc.  I understand that the answer depends highly on my implementation, but the above mentioned proposed architecture may provided some minor helpful context to propose an answer.)


ObjectDB reuses space of deleted objects but the database is never resized to a smaller file.

Currently the only way to make the database file smaller is to run the ObjectDB doctor in repair mode (i.e. building a new database file from an existing database).

ObjectDB Support