Re: Deleting indexes during runtime
Posted in 1991
Here's one consideration to look into: if any of the keys that you have indexes
on have lots of duplicate values, that will slow down the performance of
deletions very substantially. Given the b-tree structures that informix uses
for its indexes, it has to do a linear search through the index entries that
have the key value it's trying to delete. That's fine when there are rarely
more than one or two records for each key value, but disasterous if there
are 1000.
I was stumped by this problem for a couple of years, until Informix put an
article about it in Tech Notes. If this is part of what's slowing you down,
there are two things to look into:
1) Consider doing without some of the indices. If the percentage of
duplications is high enough, they may be slowing you down more than
they're speeding you up.
2) Use combined keys, i.e. (in SQL, I don't know C-ISAM):
create index indx1 on tbl1 (fld1, fld2);instead of having two indexes, one on each field. Depending on the
searches you, having the second key in the index might be very
valuable, or might be useless for searching, but either way it'll cut
down on the number of duplicates in the index, and so speed up the
deletions. (If fld2 is a serial field, it would guarantee no duplicates!)
Hope this helps.
-- Harry Bochner
-- bochner@das.harvard.edu