Subject Re: How to compact database?
Author phil_hhn
Nigel Weeks wrote:
> Firebird databases don't reduce in filesize when records are
deleted, for a
> few reasons:
> Filesystem fragmentation would increase if file sizes were
> all the time.
Absolutely, and I wouldn't expect the database to change all the time
in this way, it'd be inefficient. It must already grow in 'blocks'
because I can add records and the db file size doesn't change, and I
have never removed any records.
Anyway, I thought there may be a manual option to compact the
database. Afterall, if there was - for example - 90% empty space in
the database and it never grows (it's reference data only) then it
would be a shame if it's always 'so big'. And a smaller file may be
less likely to be fragmented by crappy old windows ;-)
Some databases - when you request this type of action - take the
opportunity to reorganise and optimise their internal structures.

> Prevents another call to the operating system for more disk space - it's
> already present in the database file.
> If you need to reclaim space after your conversion process, simply do a
> backup and restore.
This what I thought I may have to do, this is no problem, just thought
I may have missed a 'compact' feature ;-)