Re: Unique or non-unique indices
Posted in 1997
John, Nope, you didn't miss anything, the optimizer should not care whether the index is unique or not it simply looks for indexed vs non indexed columns. A unique index simply enforces that there will not be duplicates on a given column, I have however heard of problems with unique indexes actually enforcing uniqueness though, better off using a constraint if that is what you are after jim ______________________________ Reply Separator _________________________________ Subject: Unique or non-unique indices Author: MIS Dept <whsmis1@bellsouth.net> at Internet Date: 7/29/97 3:05 PM Here's an indexing question: I am in the process of adding a few indices to a given table; the table itself consists of over 3 million rows. I've had a tendency to just 'create index' without thought to the uniqueness of the index. If these indices are unique, is there any benefit to defining them as such? It appears that the optimizer doesn't really care if the index is unique or not. I did some testing and in some instances my cost actually increased, slightly. Did I miss something here? TIA John Carlson WH Smith, Inc.