Subject | RE: [firebird-support] How to compact database? |
---|---|
Author | Nigel Weeks |
Post date | 2004-09-14T03:13:49Z |
Firebird databases don't reduce in filesize when records are deleted, for a
few reasons:
(AFAIK)
Filesystem fragmentation would increase if file sizes were shrinking/growing
all the time.
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.
Nige.
-----Original Message-----
From: phil_hhn [mailto:time_lord@...]
Sent: Tuesday, 14 September 2004 1:04 PM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] How to compact database?
Hi, sorry if this has been asked before, but I've tried searching the
archive - seems I can only search a few 100 messages at a time :-[
Anyway, we start with an empty database, 100+ tables. We then import
50 tables of data from a legacy system, 40+ MB. Next step is we create
a few temporary columns and do some very complex extraction of the old
data into the new structure. After all this, the database is 71 MB.
After dropping the old legacy data tables and temporary columns, the
database remains the same size. I expect it to be significantly
smaller, especially since there used to be a lot of de-normalised data.
So how do I compact the Firebird database?
It may not seem like a large DB file, but many or our installations
are small, and we have 1000's of them, so having a nice lean DB (and
running regular maintenance cleanups) is very desireable. We also have
some larger sites where the databases may be 5x (or more) larger.
Thanks,
Phil
Yahoo! Groups Links
__________ NOD32 1.869 (20040913) Information __________
This message was checked by NOD32 antivirus system.
http://www.nod32.com
few reasons:
(AFAIK)
Filesystem fragmentation would increase if file sizes were shrinking/growing
all the time.
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.
Nige.
-----Original Message-----
From: phil_hhn [mailto:time_lord@...]
Sent: Tuesday, 14 September 2004 1:04 PM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] How to compact database?
Hi, sorry if this has been asked before, but I've tried searching the
archive - seems I can only search a few 100 messages at a time :-[
Anyway, we start with an empty database, 100+ tables. We then import
50 tables of data from a legacy system, 40+ MB. Next step is we create
a few temporary columns and do some very complex extraction of the old
data into the new structure. After all this, the database is 71 MB.
After dropping the old legacy data tables and temporary columns, the
database remains the same size. I expect it to be significantly
smaller, especially since there used to be a lot of de-normalised data.
So how do I compact the Firebird database?
It may not seem like a large DB file, but many or our installations
are small, and we have 1000's of them, so having a nice lean DB (and
running regular maintenance cleanups) is very desireable. We also have
some larger sites where the databases may be 5x (or more) larger.
Thanks,
Phil
Yahoo! Groups Links
__________ NOD32 1.869 (20040913) Information __________
This message was checked by NOD32 antivirus system.
http://www.nod32.com