mirror of
https://github.com/bitwarden/server.git
synced 2025-06-29 15:16:15 -05:00
update indexes
This commit is contained in:
parent
000e1419bb
commit
ee3f38eda6
@ -16,7 +16,14 @@ CREATE NONCLUSTERED INDEX IX_CollectionGroup_GroupId
|
||||
|
||||
GO
|
||||
|
||||
CREATE NONCLUSTERED INDEX IX_CollectionGroup_GroupId_ReadOnly
|
||||
ON dbo.CollectionGroup (GroupId, ReadOnly)
|
||||
INCLUDE (CollectionId);
|
||||
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
|
||||
ON dbo.CollectionGroup (GroupId, ReadOnly)
|
||||
INCLUDE (CollectionId);
|
||||
END
|
||||
|
@ -15,8 +15,16 @@ CREATE NONCLUSTERED INDEX IX_CollectionUser_OrganizationUserId
|
||||
INCLUDE (ReadOnly, HidePasswords, Manage)
|
||||
|
||||
GO
|
||||
CREATE NONCLUSTERED INDEX IX_CollectionUser_OrganizationUserId_ReadOnly
|
||||
ON dbo.CollectionUser (OrganizationUserId, ReadOnly)
|
||||
INCLUDE (CollectionId);
|
||||
|
||||
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
|
||||
ON dbo.CollectionUser (OrganizationUserId, ReadOnly)
|
||||
INCLUDE (CollectionId);
|
||||
END
|
||||
GO
|
||||
|
@ -22,7 +22,15 @@ CREATE NONCLUSTERED INDEX [IX_SecurityTask_OrganizationId]
|
||||
|
||||
GO
|
||||
|
||||
CREATE NONCLUSTERED INDEX IX_SecurityTask_Status_OrgId_CreationDateDesc
|
||||
ON dbo.SecurityTask (Status, OrganizationId, CreationDate DESC)
|
||||
INCLUDE (CipherId, [Type], RevisionDate);
|
||||
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
|
||||
ON dbo.SecurityTask (Status, OrganizationId, CreationDate DESC)
|
||||
INCLUDE (CipherId, [Type], RevisionDate);
|
||||
END
|
||||
GO
|
||||
|
Loading…
x
Reference in New Issue
Block a user