Subject | Re: [firebird-support] Slow updates |
---|---|
Author | Ivan Prenosil |
Post date | 2005-03-23T08:35:15Z |
>> One field that contains the integer 0 in 99% of the records andI always thought that low-selectivity indexes slow down garbage
>> 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).
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