Subject Re: [firebird-support] Slow updates
Author Ivan Prenosil
>> One field that contains the integer 0 in 99% of the records and
>> different values for all other records. Sometimes I need to update
>> this field with something like
>>
>> update MYTABLE set F = newvalue where F = oldvalue
>>
>> If I don't have an index, update is very slow. But having an index on
>> a field where a lot of records are the same, slows down the insert of
>> new records. What is the best solution for this problem?
>
> Create a compound index on F, PK (primary key).

I always thought that low-selectivity indexes slow down garbage
collection, but that inserting new values should be affected minimally
because new value is put at the beginning of duplicate chain.
Am I wrong ?

Ivan