tags:

views:

187

answers:

2

I deleted many records from my table but the DB size (Firebird) left the same. How do I decrease it?

I am looking for something similar to vacuum in PostgreS.

+1  A: 

This is one of many pains of firebird. Best and only effective and right way to do this - backup/restore your database using gbak

Alexey Sviridov
A: 

Firebird will occasionally run a sweep to remove the records from indexes etc., and regain the space for other use. In other words, as soon as the sweep has run, you will have the same performance as if the database file was smaller. You can enforce an immediate sweep, if that is what you are trying to do.

However, the size of the actual database will not shrink, no matter what, except if you do a backup and restore. If size is a problem, use the -USE_ALL_SPACE parameter for gbak, it will prevent that space is being reserved for future records, which will yield a smaller database.

Lars D