Subject | Re: [firebird-support] FB Database gets slow and grow up to much with the time passed.. |
---|---|
Author | Florian Hector |
Post date | 2005-06-04T21:09:49Z |
> We have an application that work w/o interruptions with Firebird 1.52,Shrinking the database size is only possible with a backup/restore
> the Database process transacctions 24/7, after some days the
> transaccions get slower and the Database grows to much (in a period of
> 1 to 2 weeks)
>
> The solutions we take are:
>
> 1.- Reset the server
>
> 2.- Backup and restore the database (after that the side of the
> database shrinks a lot)
>
> My question is why do this ocurrs?
>
> and what could it be the solution?
>
> The application MUST NOT STOP, so, how can we purge the dabase w/o
> shut it down or avoid the problems explained?
>
cycle, hence not usable for you.
Much more of interest for you is the question why the database file
grows much more than the inserted values account for. If you search the
archives you will find quite a few threads with the same topic.
In most cases the growth of the DB is caused by long running
transactions without a hard commit.
Others can explain it more accurately but the basic idea is that even a
simple select statement causes the server to keep back versions of the
selected data when this data is modified by others in the meantime,
meaning the DB file grows.
This effect can be seen by querying the statistic of the database. When
the oldest transaction and the oldest active transaction differ too
much, that's an indication of long running uncommitted transactions.
So the cause of the problem is rather to be found at the client and not
at the server.
Florian