Re: Unique index or not
Posted in 1997
I would suggest that this index isn't unique anyway, unless there is something you haven't told us. Otherwise you would have only 1 unique index on col1 and col2 (surely ?!?). As for performance, you could create the secondary index on just col2 and Informix would use both indexes to satisfy data retrievals. Depends on how much space you have, how big col1 is, etc ..... Just my thoughts, Rick. Peter Wang wrote: > Dear all, > > Suppose I have a table with three columns: col1, col2, col3. For data > integraty constraint, there is a unique index created for col1. For > query performance, I need to add an composite index on col1, and col2, > > Which type of index you would suggest to add: unique or duplicate? I > think the uniqe type is unnecessary and has a bigger impact on insert. > > But I'm not sure whether it has advantage over the duplicate type on > select. > > Any comments? > > Cheers.