Subject | Re: How to compact database? |
---|---|
Author | phil_hhn |
Post date | 2004-09-14T06:40Z |
Nigel Weeks wrote:
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.
I may have missed a 'compact' feature ;-)
Thanks
> Firebird databases don't reduce in filesize when records aredeleted, for a
> few reasons:shrinking/growing
> (AFAIK)
> 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'sThis what I thought I may have to do, this is no problem, just thought
> already present in the database file.
>
> If you need to reclaim space after your conversion process, simply do a
> backup and restore.
I may have missed a 'compact' feature ;-)
Thanks