Subject | Slow updates |
---|---|
Author | Christian Kaufmann |
Post date | 2005-03-22T22:04:43Z |
I have the following problem:
Table with 1.5 million records, growing constantly.
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?
cu Christian
Table with 1.5 million records, growing constantly.
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?
cu Christian