Subject Re: [firebird-support] Shrink Firebird (Urgente)
Author Lester Caine
Kurt Schneider wrote:

> Really the problem is hard, and the solution is really complex. But, i thing
> and future versions os Firebird this "shrink" solutions is necessary or more
> easy for database administradors. See, i'm over 200 database user (clients)
> and various brazilian states. All suport occurrs remotly. Time an Time must
> database backup and restore, and this operation consume several time for
> support and clients.
> I'm not justific my geografic client problem, but i see the "shrink" was a
> new and easy way to database size reduce.

"shrink" used to be called "pack" many years ago. This removed the
deleted records from a "flat" database. Firebird does not require that
operation as it reuses the available space itself. It needs an amount of
extra space for copies of records as it works and it reuses them - if
your program is closing transactions properly.

> I'm not understand who configure or set to off for not log file create in
> firebird. Other question pertinent is: When my database have 8 MB, i'm
> using gbak and see create and file backuped with 1,2 MB. Whel, when i'm
> restoring the backup de file have the similar (7,8 Mb) size. What have the
> gbak to reduce significant size of database?

The backup file has no indexes and compresses a large section of the
systems information. So it does not have the ability to find
information. Restore rebuilds the indexes and tables so that you can
access the data. Since there were obviously few deleted records in your
database the size will not change, but as soon as you start working
again, the size of the file MUST increase to give you space for the
working copies of records. You DO NOT NORMALLY NEED TO RESTORE - in fact
the last time I had to work with a restored production database was the
result of a major hardware crash. Backup every night - restore to check
that the backup is ok, but don't worry about trying to shrink the
database size - it needs space to work anyway.

> I'm sory my bad english, but, the question and dialog is fine.

Try the Brazilian support sites for a better description in your own
language ;) ( I'm sure someone will post a link - I don't have one to
hand :( )

Lester Caine - G8HFL
L.S.Caine Electronic Services -
Model Engineers Digital Workshop -
Treasurer - Firebird Foundation Inc. -