Subject Re: Database Size problem?? Please Help
Author Allen
--- In firebird-support@yahoogroups.com, Alexandre Benson Smith
<iblist@t...> wrote:
> 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.
> >Thanks...
> >
> >
> 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
> allocation.
>
> 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
> needed).
>
> 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
> history.
>
> see you !
>
> --
>
> Alexandre Benson Smith
> Development
> THOR Software e Comercial Ltda.
> Santo Andre - Sao Paulo - Brazil
> www.thorsoftware.com.br
>
>
>
> --
> 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

Thank you for the quick reply..^_^

But is there any way I can shink the db(other than back and restore
it) or force it to reuse the free space?

My real problem is that my program have do a lot of calculation and I
use db as a drawing borad. If I use the ordinary harddisk to run it,
then it will take about 2~3 week to finish one cycle of pattern
analyzing, which is too slow. So I put the database file on a
ramdisk,can refer to http://www.superspeed.com/servers/ramdisk.php.
It really speed it up, but just eat up too much memory.

Is gfix -sweep can use here? I try it, but seens no effect at all(may
be is my misunderstanding the use of it).

Best Reguard

Allen