Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ALTER TABLE dbo.superbusytable DROP CONSTRAINT PK_BestKeyEver
GO
ALTER TABLE dbo.superbusytable
ADD CONSTRAINT PK_BestKeyEver
PRIMARY KEY CLUSTERED (id, insertdate ) ON ps_MonthlyWindow(insertdate); -- insertdate is an ever increasing date, we'll never be inserting "old" records
GO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment