Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Microsoft SQL Server
>Hi,
>
>When I make a field to be a Primary key (the field is Int type and Identity is set ON), SQL server creates a KEY named PK_Table_Name and at the same time it creates a Unique Non-Clustered index of the same name (e.g. PK_Table_Name). Will SQL use this index when optimizing searches that include the PK field?
>
>The reason I am asking is that I noticed that - somehow - when I was creating the table I created a separate Non-Unique and Non-Clustered Index On the same fields (which is the PK field). Therefore, my question is, would it be Ok to delete this "extra" index that I created?
>
>TIA
That it makes the primary key clustered automatically is probably a bad move. The key has no meaning. Performance may be enhanced by clustering on another field.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only