Skip to content

Instantly share code, notes, and snippets.

@timgabrhel
Created December 4, 2019 22:30
Show Gist options
  • Save timgabrhel/0a9ff88160ebc9e40559e1e10ecc7ee4 to your computer and use it in GitHub Desktop.
Save timgabrhel/0a9ff88160ebc9e40559e1e10ecc7ee4 to your computer and use it in GitHub Desktop.
message threads indexes
CREATE NONCLUSTERED INDEX [nci_wi_MessageThreads_4AE42CECCF44AA0519F913BAF59A3CFA] ON [dbo].[MessageThreads]
(
[FromUserDeleted] ASC,
[FromUserHasArchived] ASC
)
INCLUDE ( [CanReply],
[Created],
[Subject],
[ThreadSentTo],
[ThreadStartedBy],
[ToUserDeleted],
[ToUserHasArchived]) WITH (STATISTICS_NORECOMPUTE = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MessageThreads] ADD CONSTRAINT [PK_MessageThreads] PRIMARY KEY CLUSTERED
(
[MessageThreadId] ASC
)WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF) ON [PRIMARY]
GO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment