Indexes on highly duplicate columns - Performance?
Posted in 1994
We have a little column (CHAR(2)) in a table of about 800 rows. There are about 6 different values in the column. People here (who pay me money) reckon I should create an index on it that looks like this: So: CREATE INDEX myindex ON mytable (little_column, other_uniqueish_column) Not: CREATE INDEX myindex ON mytable (little_column) Their logic states that one should add some other columns into the index so that the B-Tree isn't filled with lots of duplicate records. Is this sensible? Anybody else heard this theory before? JL? Regards, Kerry S --------------------------------------,------------------------------------- Kerry Sainsbury, kerry@kcbbs.gen.nz | THE INFORMIX FAQ Quanta Systems, Auckland, New Zealand | kcbbs.gen.nz:/informix/* | mathcs.emory.edu:/pub/informix/faq/* +64 9 377-4473 (work) 276-5546 (home) | quasar.ucar.edu:/?