Subject Re: [firebird-support] Re: Is there still a difference between sweep and gabage collection?
Greetings For The Day.

I am using which has a grid of 100,000 records and 30 columns have to insert in a firebird table. The insertion will take place if product id does not exist else record to be update.
But inside the loop while executing ExecuteNonQuery control does not come back wait for 10 hours still not came and no error message and it happens on random rows not always for the same recrod
I am struck past 7 days i am working googled but no solution Finally i decided to firebird support team

My project is getting delayed please, help

Sukhen Dass

On Saturday, February 21, 2015 3:55 AM, "Nick Upson nu@... [firebird-support]" <> wrote:


if I run gbak -g every night I should also run gfix​, but if I run gbak without -g I don't need gfix (but it helps a little) ?

Nick Upson, Telensa Ltd, Senior Operations Network Engineer
direct +44 (0) 1799 533252, support hotline +44 (0) 1799 399200

On 20 February 2015 at 18:36, Ann Harrison aharrison@... [firebird-support] <> wrote:


Gbak backup removes all unnecessary back versions and all rolled back changes, unless it is run with the -g switch. That switch is provided for those cases where a database cleanup is not needed. Examples include the case when the database will immediately be replaced by a restored version, upgrading the ODS, for example, or when a sweep has just been run.

What gbak does not do that sweep does it change the identity of the oldest interesting transaction. Unlike the oldest active transaction, the oldest interesting transaction is not critical for performance, but having it correct does make things slightly better. The oldest interesting transaction is the first transaction, still visible in the database, that did not commit. Any data created by older transactions is known to have been created by committed transactions. A transaction reading it doesn't have the check the state of the creating transaction. When accessing data created by a more recent transaction, the reader must test a bit in a bit vector to determine the state of the creating transaction. Pretty cheap.

During a sweep, gfix notes the oldest transaction whose work it could not clean up. At the end of the sweep, that becomes the oldest interesting transaction.

In the absence of the -g switch or the attachment parameter that implements that switch, any process that reads all the data in a database removes all unnecessary old or rolled back record versions, either itself or through the proxy of the garbage collect thread. Only gfix changes the recorded oldest interesting transaction.