Subject Re: [firebird-support] Re: Firebird Sleeping
Author Ann W. Harrison
lseckde wrote:
>
> Yes there are about 20000 record versions of some record's.
>
> But this leads me to the next question, why there are as many
> versions ?

Probably because the record is changed a lot while there is an
long-lived transaction active. If you open anything but a read-only
read-committed transaction, you inhibit garbage collection.

Often, if you find a single record that's getting updated a lot, you've
also found a performance bottleneck. Updating that record synchronizes
your application threads (or clients or whatever is doing the updates).
It might be worth looking for a different way to do whatever it is
you're doing by modifying that records.

> I made an little test, I wrote an simple application that does:
> -start transaction
> -change an single record
> -commit
> -repeate endless ..

How did you run the test? I ask because a lot of tools - isql and qli
among others - open a second transaction to handle metadata lookups.
That second transaction blocks garbage collection.

Alternately, the transaction you're using to read the record may be at
fault.


Do you have indexes on the table? On a duplicated field?
>
> Result:
> Interbase:
> -With each change there is an new recorversion
> -While changing is running, reading the same record with diffenent
> application has no influence at the record versions
> -stopping changing, and reading the same record with an different
> application, seems to start garbage collection (100%CPU for 30
> minutes at about 100000 record versions (400 pages))

OK, that's ugly.
>
> Firbird:
> -With each change there is an new recorversion
> -While changing is running, reading the same record with diffenent
> application has no influence at the record versions
> -stopping changing, and reading the same record with an different
> application, seems to start garbage collection but absolutely no CPU
> usage, there are just gone

Which version of Firebird?
>
> Now I have even more questions:
> 1. Why are there recordversion if there is only on application that
> is connected to the database (one transaction)?

As above, there could be another active transaction.

> 2. Why does garbage collection does not occure if I read the record,
> while still an other transaction changed the record again. I thought
> that still the older versions could be marked as garbage?

Same answer.

> 3. Is there realy such an big inmprovment in garbage collection in
> firebird, that an cleanup that take minutes in interbase takes
> milliseconds in firebird?

Some versions of Firebird, yes, there are.


Regards,


Ann