Re: Adding Indexes to New Columns
Posted in 1994
In article <2rgcnsINNqsp@jumbo.read.tasc.com>, bfmclaughlin@tasc.com (Brendan F. McLaughlin) writes: |> I am assuming that |> building an index on a 100,000 row table where the index column has the |> same value will result in a weird B-tree. I don't know if it works this way with ONLINE, but here's something to watch out for: under SE indices with lots of duplicate values have the side effect that it becomes very expensive to delete rows that have the duplicate value for that field. The reason is that sqlexec has to do a linear search through the index entries in order to find the entry that needs to be deleted :-( This was explained in Tech Notes several years ago. Until then I was puzzled by the fact that deletions from my main table sometimes took 10 minutes for my users, even though they always went quickly in my testing. Turned out I had 30,000 entries with nulls in an indexed field, and deleting any one of those entries was _very_ slow. I fixed it by writing a little program to update null values of that field to X1, X2, .... Fortunately that was an acceptable thing to do in this case. Hope this helps, -- Harry Bochner bochner@das.harvard.edu