Costs of updating indexes?
Posted in 1994
A question for the group?
How much does adding a few fields to an index add to the cost of
updating rows? I know that adding ADDITIONAL indexes can appreciably
add to the update cost. Suppose you have an index like this:
create index test_small on table (smallint1, smallint2);
You find a need to add two more fields to the index:
create index test_larger on table (smallint1, smallint2, smallint3, smallint4);
My theory is that since the major cost factor is disk access, simply
adding a few fields to the index is not very costly, as long as it does not
add another level of B+tree to the index. I know that if smallint1 and
smallint2 were not very selective, and if there were lots of duplicates,
updating the index could take longer, but what if they are already pretty
selective?
Does set explain on reflect accurate costs in this area? I ran a test
using set explain against update statements with both indexes, and it
gave the same cost. Is this accurate?
Thanks,
Joe
--
===========================================================================
jlumbley@netcom.com (Joe Lumbley)
BancTec Service Corportation 214-450-9896
Dallas, Texas
Watch for my _INFORMIX DBA SURVIVAL GUIDE_ in Fall '94 from Prentice Hall!
===========================================================================