Subject Re: [firebird-support] Slow updates
Author Ann W. Harrison
Christian Kaufmann wrote:
>
> 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).


Regards,


Ann