Subject Re: [Firebird-devel] Sweep or not to sweep
Author Daniel Rail

You should post this question to
This is a forum concerning the development of Firebird.

Anyway, here are my comments. And, I'm also posting this reply to
firebird-support, so answer me there.

At July 29, 2004, 14:05, Sham wrote:

> Our database has been growing and is currently 500 MB. We ran gbak on it and
> restored it and it came down to 150MB.

This would be normal.

> I was wondering if there is a way of doing gbak backup/restore
> automatically?

Yes there is. Look at

> I thought that was what sweep was for but even if I set the sweep interval
> to a low value, the size of the database does not get smaller. Selecting the
> sweep option in IBOConsole does not reduce the size of the database (what is
> it doing to the database??)

Sweep will help in the garbage collection and free some space, but
will not reduce the size of the DB file. Also garbage collection is
probably performed more often than a sweep has a chance to run, and
here too you will not see the DB file size reduce. But, Firebird will
reuse freed up/empty space/pages.

Best regards,
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (
ACCRA Med Software Inc. (