September 30, 2005 at 9:06 am
What the differense??? If any, what the cons and pros of each???
Borik
Your help is appreciated.
September 30, 2005 at 12:50 pm
unique index:
pro: speed up selects,DRI
cons: slows updates, deletes, inserts as the index needs to be maintained, space used
use : mostly if the fields are frequently searched upon
unique constraint:
pro: still maintains uniqueness, doesn't slow down updates/deletes/inserts
no extra space used
cons: selects aren't speeded up
use :mostly if they just have to be unique
September 30, 2005 at 1:01 pm
Are you sure about all that... AFAIK, constraint are also indexed and used in queries.
September 30, 2005 at 1:35 pm
Unique constraints are enforced by the creation of a unique index. There is no difference in either performance or functionality. About the only difference is that if you just create a unique index it won't show up as a "constraint", but it still does the same thing.
/*****************
If most people are not willing to see the difficulty, this is mainly because, consciously or unconsciously, they assume that it will be they who will settle these questions for the others, and because they are convinced of their own capacity to do this. -Friedrich August von Hayek
*****************/
October 1, 2005 at 7:09 am
Thanks for pointing that out.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply