Subject | Re: [firebird-support] Compress Database |
---|---|
Author | Alexandre Benson Smith |
Post date | 2004-03-30T14:54:50Z |
At 08:03 30/03/2004 -0300, you wrote:
A simple answer....
When you insert a lot of records, the database will grow, new pages will be
allocated and so on...
But when you delete a record, the database will not shrink, the space will
be "available" to be used on new inserted records.
So if you do a lot of inserts and then a lot of deletes, as you stated on
your original message, the database will have a lot of "free" space inside
the pages, so only a backup/restore could shrink the database, because when
you restore, the database will be recreated, and the pages will fills up
with data, so will not have a lot a free space on the pages...
I have never did a backup/restore cicle to reduce the database size... In
the daily work a mix of insert/delete don't let the database with lot of
free space lying around...
A backup/restore cicle will do a lot to a database, rebalance the index
tree, make it smaller, remove old record versions, etc. This could be used
the maintain teh database "clean", but I do not do it frequently on the
production servers, don't know if there is a magic number of days/months
when a backup/restore will be a good thing to do...
see you !
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda.
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br
----------
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.631 / Virus Database: 404 - Release Date: 17/03/2004
[Non-text portions of this message have been removed]
> It works.Hi Marcelo,
> Now the FDB is with 380KB.
>
> I will have to do this usually?
>
>..::
> Marcello Fontolan
> marcello@...
>::..
>
>
A simple answer....
When you insert a lot of records, the database will grow, new pages will be
allocated and so on...
But when you delete a record, the database will not shrink, the space will
be "available" to be used on new inserted records.
So if you do a lot of inserts and then a lot of deletes, as you stated on
your original message, the database will have a lot of "free" space inside
the pages, so only a backup/restore could shrink the database, because when
you restore, the database will be recreated, and the pages will fills up
with data, so will not have a lot a free space on the pages...
I have never did a backup/restore cicle to reduce the database size... In
the daily work a mix of insert/delete don't let the database with lot of
free space lying around...
A backup/restore cicle will do a lot to a database, rebalance the index
tree, make it smaller, remove old record versions, etc. This could be used
the maintain teh database "clean", but I do not do it frequently on the
production servers, don't know if there is a magic number of days/months
when a backup/restore will be a good thing to do...
see you !
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda.
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br
----------
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.631 / Virus Database: 404 - Release Date: 17/03/2004
[Non-text portions of this message have been removed]