Subject | Re: [firebird-support] Re: Firebird Sleeping |
---|---|
Author | Ann W. Harrison |
Post date | 2005-04-21T16:50:04Z |
lseckde wrote:
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.
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?
Regards,
Ann
>Probably because the record is changed a lot while there is an
> 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 ?
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:How did you run the test? I ask because a lot of tools - isql and qli
> -start transaction
> -change an single record
> -commit
> -repeate endless ..
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?
>OK, that's ugly.
> 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))
>Which version of Firebird?
> 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
>As above, there could be another active transaction.
> 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)?
> 2. Why does garbage collection does not occure if I read the record,Same answer.
> while still an other transaction changed the record again. I thought
> that still the older versions could be marked as garbage?
> 3. Is there realy such an big inmprovment in garbage collection inSome versions of Firebird, yes, there are.
> firebird, that an cleanup that take minutes in interbase takes
> milliseconds in firebird?
Regards,
Ann