mirror of
https://github.com/bitwarden/server.git
synced 2025-06-29 23:26:12 -05:00
update indexes
This commit is contained in:
parent
000e1419bb
commit
ee3f38eda6
@ -16,7 +16,14 @@ CREATE NONCLUSTERED INDEX IX_CollectionGroup_GroupId
|
|||||||
|
|
||||||
GO
|
GO
|
||||||
|
|
||||||
|
IF NOT EXISTS (
|
||||||
|
SELECT 1
|
||||||
|
FROM sys.indexes
|
||||||
|
WHERE object_id = OBJECT_ID('dbo.CollectionGroup')
|
||||||
|
AND name = 'IX_CollectionGroup_GroupId_ReadOnly'
|
||||||
|
)
|
||||||
|
BEGIN
|
||||||
CREATE NONCLUSTERED INDEX IX_CollectionGroup_GroupId_ReadOnly
|
CREATE NONCLUSTERED INDEX IX_CollectionGroup_GroupId_ReadOnly
|
||||||
ON dbo.CollectionGroup (GroupId, ReadOnly)
|
ON dbo.CollectionGroup (GroupId, ReadOnly)
|
||||||
INCLUDE (CollectionId);
|
INCLUDE (CollectionId);
|
||||||
GO
|
END
|
||||||
|
@ -15,8 +15,16 @@ CREATE NONCLUSTERED INDEX IX_CollectionUser_OrganizationUserId
|
|||||||
INCLUDE (ReadOnly, HidePasswords, Manage)
|
INCLUDE (ReadOnly, HidePasswords, Manage)
|
||||||
|
|
||||||
GO
|
GO
|
||||||
|
|
||||||
|
IF NOT EXISTS (
|
||||||
|
SELECT 1
|
||||||
|
FROM sys.indexes
|
||||||
|
WHERE object_id = OBJECT_ID('dbo.CollectionUser')
|
||||||
|
AND name = 'IX_CollectionUser_OrganizationUserId_ReadOnly'
|
||||||
|
)
|
||||||
|
BEGIN
|
||||||
CREATE NONCLUSTERED INDEX IX_CollectionUser_OrganizationUserId_ReadOnly
|
CREATE NONCLUSTERED INDEX IX_CollectionUser_OrganizationUserId_ReadOnly
|
||||||
ON dbo.CollectionUser (OrganizationUserId, ReadOnly)
|
ON dbo.CollectionUser (OrganizationUserId, ReadOnly)
|
||||||
INCLUDE (CollectionId);
|
INCLUDE (CollectionId);
|
||||||
|
END
|
||||||
GO
|
GO
|
||||||
|
@ -22,7 +22,15 @@ CREATE NONCLUSTERED INDEX [IX_SecurityTask_OrganizationId]
|
|||||||
|
|
||||||
GO
|
GO
|
||||||
|
|
||||||
|
IF NOT EXISTS (
|
||||||
|
SELECT 1
|
||||||
|
FROM sys.indexes
|
||||||
|
WHERE object_id = OBJECT_ID('dbo.SecurityTask')
|
||||||
|
AND name = 'IX_SecurityTask_Status_OrgId_CreationDateDesc'
|
||||||
|
)
|
||||||
|
BEGIN
|
||||||
CREATE NONCLUSTERED INDEX IX_SecurityTask_Status_OrgId_CreationDateDesc
|
CREATE NONCLUSTERED INDEX IX_SecurityTask_Status_OrgId_CreationDateDesc
|
||||||
ON dbo.SecurityTask (Status, OrganizationId, CreationDate DESC)
|
ON dbo.SecurityTask (Status, OrganizationId, CreationDate DESC)
|
||||||
INCLUDE (CipherId, [Type], RevisionDate);
|
INCLUDE (CipherId, [Type], RevisionDate);
|
||||||
|
END
|
||||||
GO
|
GO
|
||||||
|
Loading…
x
Reference in New Issue
Block a user