1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 07:36:14 -05:00

update more sprocs to use proper index

This commit is contained in:
Kyle Spearrin
2018-04-25 13:55:47 -04:00
parent 3a0622ca43
commit 4e6e215d35
3 changed files with 89 additions and 2 deletions

View File

@ -15,7 +15,8 @@ BEGIN
FROM
[dbo].[Cipher]
WHERE
[OrganizationId] = @Id
[UserId] IS NULL
AND [OrganizationId] = @Id
SET @BatchSize = @@ROWCOUNT

View File

@ -25,7 +25,8 @@ BEGIN
LEFT JOIN
[CTE] ON C.[Id] = [CTE].[Id]
WHERE
C.[OrganizationId] = @Id
C.[UserId] IS NULL
AND C.[OrganizationId] = @Id
UPDATE
[dbo].[Organization]