Subject | Do nulls cause comparisons to execute very slowly? |
---|---|
Author | mlq97 |
Post date | 2008-10-10T18:32:39Z |
Some of the columns in one of my tables contain mainly nulls, others
contain very few.
I am trying to improve performance of a procedure which updates many
rows. The rows have a trigger which compares new/old values and I have
noticed that the execution speed is much slower when comparing the
columns with many nulls. eg
Compare new.ColumnWithFewNulls with old.ColumnWithFewNulls = FAST
Compare new.ColumnWithManyNulls with old.ColumnWithManyNulls = SLOW
Is this a known characteristic of nulls?
If so, is there any way to accelerate this, other than removing the nulls?
Many thanks
Mitch
contain very few.
I am trying to improve performance of a procedure which updates many
rows. The rows have a trigger which compares new/old values and I have
noticed that the execution speed is much slower when comparing the
columns with many nulls. eg
Compare new.ColumnWithFewNulls with old.ColumnWithFewNulls = FAST
Compare new.ColumnWithManyNulls with old.ColumnWithManyNulls = SLOW
Is this a known characteristic of nulls?
If so, is there any way to accelerate this, other than removing the nulls?
Many thanks
Mitch