Subject RE: [firebird-support] Gbak never end...
Author Svein Erling Tysvær
If you look at your database statistics (when the database is slow, not after you've stopped it), you'll probably find that the difference between oldest transaction and next transaction is large. All changes you've done in transactions since the oldest active transaction has to be kept, so if you've deleted 10 million rows, they are still in the database because they may still be visible to transactions started before they were deleted. If you've updated some rows, various versions of the rows are kept in the database, so that if you've updated a row 10 times since the oldest active transaction, then there are 11 versions of that row stored in the database.

One very important part of Firebird is transactions. They should never be running for a long time (well, 'never' is a strong word - read-only, read-committed transactions may be kept running, as can all transactions on read-only databases, however, your transactions probably do not fall in these two categories when you have the kind of symptoms you describe).

There may of course be other reasons for your problem, but it is typical for us Delphi developers (particularly if we have desktop database background) to not take proper care of our transactions and observe that our programs become slower and slower until we finally decide to stop the database. Then everything works fine for a while again until a new slow-down cycle starts. If this fits your observations, then you need to take a look at the transactions. If your problem is not gradually worsening, but that the program seems to work perfectly until suddenly coming to a halt and that there is no large gap in the statistics, I'd say there is probably some other reason for your problem.

Set

-----Original Message-----
From: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] On Behalf Of x2412421
Sent: 12. februar 2009 06:52
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Gbak never end...

Hi,

I developed a program using Delphi and I'm accessing a database of
4Gb. My program can access the database without any problem except
that, for an unknown reason, sometimes it is very slow and my program
seam to stop responding.

So, I thought that the database could be damaged or needed to be
defragmented. So, I decided to do a backup/restore using gbak.
However, when I try to backup the database, the gbak process never
end. I alo tried the gfix utility with the same problem. It can run
for hours without finishing. Usually, when I backup this database, it
tkes only 10 to 15 minutes.

So, is it mean that the database is corrupt?

What is strange is that I can access this database using my program.

Thanks for any help.