Subject Re: [firebird-support] Database Size problem?? Please Help
Author Alexandre Benson Smith
a07272 wrote:

>Dear All
>I am currently doing a number pattern analyzing program. I use Firebird
>as my database, Delphi as my dev. tool.
>I use only 3 table, and no more then 10000 rows of data. Each data is
>less then 200 byte.
>But after program finish, the database it grow to 202MB . Then I
>backup the database, it shink back to 56KB. Can anyone tell me what's
>happening? Or anyway I can keep the database size as small as possible.
Dear a07272,

Take a look on the messages history it was explained a bunch of times...

To help you in a quick way:

The database are collection of pages (the minimum allocation unit used
by the engine), when new space are necessary the engine allocates a new
page, when a page is empty it's marked as "not used" so when new space
are necessary the "not used" page will be used instead of new disk space

So it's normal to see the DB size expand, you will never see it shrink
(unless you do a backup/restore that creates a new DB).

What makes a DB exapand are among other things, new data inserted,
updated records (if you have a lot of simultaneous transactions the
record versiosns necessary will be greater and by consequence more space

If you insert a million records and after processess delete those
records your DB will still "big".

To learn more about it, I see the guru's answers look ate the message

see you !


Alexandre Benson Smith
THOR Software e Comercial Ltda.
Santo Andre - Sao Paulo - Brazil

No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.9.13 - Release Date: 16/04/2005