[dba-SQLServer] Unique indexes vs. constraints

Djabarov, Robert Robert.Djabarov at usaa.com
Mon Mar 8 11:05:25 CST 2004

Hmmm, I always thought that there were only 2 types of indexes, -
clustered and non-clustered.  Primary Key constraint also ensures
uniqueness, just like unique constraint.

Robert Djabarov
SQL Server & UDB
Sr. SQL Server Administrator
Phone: (210)  913-3148
Pager: (210) 753-3148
9800 Fredericksburg Rd. San Antonio, TX  78288

-----Original Message-----
From: dba-sqlserver-bounces at databaseadvisors.com
[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Mark
Sent: Monday, March 08, 2004 9:46 AM
To: dba-sqlserver at databaseadvisors.com
Subject: [dba-SQLServer] Unique indexes vs. constraints

What's the value of using a unique constraint vs. a unique index?  Is it
that you would use an index if you also wanted to sort or search on that
field, and a constraint if you just wanted to enforce uniqueness without
overhead of an index?  Or is there more to it than that?

Mark Whittinghill
Symphony Information Services
mwhittinghill at symphonyinfo.com

dba-SQLServer mailing list
dba-SQLServer at databaseadvisors.com

More information about the dba-SQLServer mailing list