Subject | Re: [firebird-support] Compacting the database from a App |
---|---|
Author | Ann W. Harrison |
Post date | 2010-10-15T17:34:08Z |
On 10/15/2010 1:00 PM, Andrew Gable wrote:
database available for re-use by the database, Firebird does that
automatically and continuously.
If you mean that you'd like to reduce the size of the database
file, that's another problem. The only way to reduce the file
size is to stop the database, back it up, restore it to another
file, rename the old database file, rename the new database to
the old name, and restart it.
The backup and restore can be done through the services
interface. The file renaming and etc. require operating
system services.
And to what end? In very few cases a database enjoys a one-time
expansion then contracts never to expand again. More generally,
it expands for a while as the pattern of updates and deletes
becomes established, then grows as the amount of data stored
grows - whether slowly or rapidly.
Good luck,
Ann
>If by "compact" you mean that you'd like to make space in the
> I am using Vb6 and I would like to know how I compact the Firebird database
> from within my Application
>
database available for re-use by the database, Firebird does that
automatically and continuously.
If you mean that you'd like to reduce the size of the database
file, that's another problem. The only way to reduce the file
size is to stop the database, back it up, restore it to another
file, rename the old database file, rename the new database to
the old name, and restart it.
The backup and restore can be done through the services
interface. The file renaming and etc. require operating
system services.
And to what end? In very few cases a database enjoys a one-time
expansion then contracts never to expand again. More generally,
it expands for a while as the pattern of updates and deletes
becomes established, then grows as the amount of data stored
grows - whether slowly or rapidly.
Good luck,
Ann