1
0
mirror of https://github.com/bitwarden/server synced 2026-01-02 08:33:48 +00:00

refactor cipher queries by user. tuned indexing.

This commit is contained in:
Kyle Spearrin
2018-04-24 12:48:43 -04:00
parent ac4f789782
commit 165ee97d2f
16 changed files with 321 additions and 175 deletions

View File

@@ -16,12 +16,7 @@
GO
CREATE NONCLUSTERED INDEX [IX_Cipher_OrganizationId_Type]
ON [dbo].[Cipher]([OrganizationId] ASC, [Type] ASC) WHERE ([OrganizationId] IS NOT NULL);
GO
CREATE NONCLUSTERED INDEX [IX_Cipher_UserId_Type_IncludeAll]
ON [dbo].[Cipher]([UserId] ASC, [Type] ASC)
INCLUDE ([OrganizationId], [Data], [Favorites], [Folders], [Attachments], [CreationDate], [RevisionDate]);
CREATE NONCLUSTERED INDEX [IX_Cipher_UserId_OrganizationId_IncludeAll]
ON [dbo].[Cipher]([UserId] ASC, [OrganizationId] ASC)
INCLUDE ([Type], [Data], [Favorites], [Folders], [Attachments], [CreationDate], [RevisionDate]);