Subject Re: [firebird-support] Re: random slowdowns
Author Ann W. Harrison
Ferda Brabenec wrote:
>
> Most of our tables are updated only from time to time and the rest
> of them only receive new records from INSERTs (traffic data that
> comes continually).

Inserts don't cause any garbage collection unless they fail and must be
rolled back.

> There are two exceptions though: Two big tables also get SQL UPDATEs
> besides INSERTs (one of them up to 5 updates per second, the other
> not so "often"). Updated records are located using a primary key,
> updated column(s) not indexed, nor FK restricted.
> Does this add any garbage?

No. Updating a record has no effect on indexes unless the value of a key
field changes. So, unless you change the value of the foreign key,
updates won't leave old entries in the foreign key index. Those of you
who use nulls in foreign keys - specifically storing records initially
with a null, then updating the record to match a particular master
(referenced) record, be aware of the cost of that strategy.
>
> --
> Also, could you please tell us which versions of FB do not suffer with
> "very high-cpu loop removing duplicates from indexes if the duplicate
> chain is longer than about 10000 records" ?

Version 2 and higher.

Regards,


Ann