Subject Re: [firebird-support] Re: GDB file grows
Author Helen Borrie
At 10:53 AM 27/09/2004 +0000, you wrote:

>Here is the result of gstat. I did it this morning. The size of .gdb
>file was 2GB, last friday was only 20M
>Database "grader.gdb"
>Database header page information:
> Flags 0
> Checksum 12345
> Generation 1151
> Page size 4096
> ODS version 10.0
> Oldest transaction 1079
> Oldest active 1080
> Oldest snapshot 1042
> Next transaction 1145
> Bumped transaction 1
> Sequence number 0
> Next attachment ID 0
> Implementation ID 16
> Shadow count 0
> Page buffers 0
> Next header page 0
> Database dialect 3
> Creation date Sep 25, 2004 8:26:23
> Attributes
> Variable header data:
> Sweep interval: 20000
> *END*
>In your mail you mentioned the need of sweep to free up space
>occupied by deleted record. Well, some days before the problem was
>detected, there was a deletion of around 67000 record in a table.
>Usually no deletions are done in the database, they are done only to
>clean historical logs. I think, that was the cause of the problem.
>The system is running about 1 year ago and never detected something
>similar before. So, this morning I did a manually sweep, it took
>around 4 minutes -in a test database was only a few seconds- and
>after that, it seemed that the database was not growing.
>Do you think I should change the sweep interval, or just keep that in
>mind and do manually sweeps from time to time?

The sweep interval is OK, since your transaction movements look fine. Just
be aware that cleanup will be required to avoid this kind of bloat building
up if your applications do a lot of deleting. Remember to do it after this
big batch deletes; and include manual sweeping in your list of things to
do regularly. How regularly depends on how long it takes for your users to
inflate the database size to an unacceptable level.

You can sweep while users are online; but sweeping a shutdown database is
slightly more useful (so I believe, though I forget why this is so...)