Subject Re: [firebird-support] db's size problem?
Author Artur Anjos
Hi jinyang,

Just a little help to help you understand: when you delete records from the
database, the file size don't get smaller. Pages are marked internally as
'free' and they will be used when need it.

> First,I export some records from Talbe1(300 records) and save it as
script1.Table1's struct is simple.
Here, the database size should't change, even if you delete the records and
commit after export the data.

> Second,I deleted some records from Table2(80000 records).
Same here.

> Third,I import the script1 into db.
If you don't commit until now, new versions of the records will be written
to database. So, the database size should increase. After you commit you
will have some pages that will be used again (marked as empty or free).

> The size of db is 85M.
> I don't understand it,Why

If you want your database smaller, you must delete the records, commit the
changes, and backup/restore all database. This is the only way to 'shrink'
database size.

Artur