Re: Indexes on highly duplicate columns - Performance?
Posted in 1994
In article <HgPvkq4b9F56075yn@kcbbs.gen.nz> you write: } 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? } No matter how ridiculous a request, if the person that pays you money wants you to do it their way... YOU DO IT! In this particular case, they are 100% correct in their decision. DAS -- Dave Snyder @ Snide Computer Services - Folcroft, PA Current Release is db4glgen-3.21 UUCP: ..!uunet!das13!dave INTERNET: dave@das13.snide.com