Change Primary Key SQL
Change Primary Key in Sql Server 2008.
Change PK from Clustered to NonClustered in Sql Server.
Just this morning I encountered a problem in my database performance.
It appears like the person who created the table created the primary key as a clustered one, without thinking of what will be in the future and the purpose of the Id PK in the table.
After digging the web, I found this great answer which gave me the hint for the desired solution:
ADD CONSTRAINT UQ_TableX UNIQUE(Id)
DROP CONSTRAINT PK_MyTable
ADD CONSTRAINT PK_MyTable PRIMARY KEY NONCLUSTERED(Id)
DROP CONSTRAINT UQ_TableX
This solves it :)
it takes some time to drop and re-index everything.
CTO at ITweetLive.com