Subject RE: [firebird-support] Firebird 2.5 - Old ODS version databases get progressively slow until a backup/restore is performed into a NEW database.
Author Toby Moxham
Ok thanks for the information, when I was referring to restoring into an
existing database, We are currently doing it through IBExpert,

http://ibexpert.net/ibe/index.php?n=Doc.RestoreDatabase?from=Doc.8300#Re
storeDB

which I think uses GBAK so we must be mistaken with it making a
difference, as you say it should wipe it out and start again.

Ok I think in future every time we deploy a new version of firebird we
will automatically backup and restore the database to the new ODS
version.

thanks again
Toby


________________________________

From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Ann Harrison
Sent: 25 May 2011 19:55
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Firebird 2.5 - Old ODS version databases
get progressively slow until a backup/restore is performed into a NEW
database.




On Wed, May 25, 2011 at 11:42 AM, Toby Moxham <toby.moxham@...
<mailto:toby.moxham%40oak.co.uk> > wrote:
>
> ... the databases will get progressively slower to the point
> where they eventually become unusable.
>
> We think these issues come about from where our systems were initially
> on Firebird 1.5 and have been progressively upgraded to 2.5 (although
> still running on the same initial database) I have been looking into
> the ODS versions of the databases as I assume this could be caused by
> the databases being in older ODS formats whilst running on a newer
> version of firebird.

Current versions of Firebird can use ODS versions dating back to
InterBase V5,
though I wouldn't recommend it. Upgrading the software does not
automatically
update the stored database format.

> This can pretty much always be resolved by performing a backup/restore
> into a NEW database (doing the same backup/restore into the existing
> database will not resolve it)

Err, I don't know what you mean by backup/restore into the existing
database,
unless you're using something other than gbak for your backup/restore.
Gbak
always creates a new file, wiping out the old one if you happen to use
the same
name - not a good idea at all.
>
> A few questions :
>
> 1. When doing a backup/restore I assume it always converts it into the
> ODS of the firebird server being used? What differences are there
> between restoring into the existing database or into a new one (I ask
> this because we seem to only be able to resolve our issues by
restoring
> into a new database)

If you're using gbak, a restore will create a database of the ODS of the
currently running server. Again, I don't know what you mean by restoring
into an existing database.

>
> 2. Is there any way to stop us having to do this, it seems very
> unnecessary to have to do this - surely firebird should handle working
> with old ODS formats? - I have been investigating gfix -sweep but its
> not very successful.

The problem people normally have with databases that get slower over
time is a large number of old versions. gstat -a -r will report on the
number
of old versions. If sweeping isn't working, you should also look for old
transactions. A V1.5 database may be old enough that it still has the
indexes that get to be very slow when removing old versions with lots
of duplicates.

The development group creates new ODS versions to support new features
and performance improvements, and to fix bugs. New ODS versions may
seem frivolous to you, but upgrading really is in your best interest.

Good luck,

Ann

>
> NB - this has only become an issue since upgrading all our sites to
> Firebird 2.5, before then we had not really had problems like this.
>





[Non-text portions of this message have been removed]