Adding Indexes to New Columns
Posted in 1994
Here is a question concerning Online 5.0 and indexing: I have a table that has about 100,000 rows. I would like to add a new column to this table and build an index on the new column. All existing rows would get some default value during the ALTER TABLE operation, but all new rows inserted into the table would have unique values in the new column. I would like to use the new column for retrievals as part of a where clause. My question is this: Will inserts and selects from this table based on the new column be adversely effected by this scheme? 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. What will the optimizer make of all this? Will the existence of this index introduce any inefficiencies that will slow down access to this table. Thanks in advance!!!