Skip to content

Commit 78c8242

Browse files
authored
fix: avoid seq scan when updating member identities (#3817)
1 parent 0addc55 commit 78c8242

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • services/libs/data-access-layer/src/old/apps/data_sink_worker/repo

services/libs/data-access-layer/src/old/apps/data_sink_worker/repo/member.repo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export default class MemberRepository extends RepositoryBase<MemberRepository> {
5959
['verified', '?memberId', '?platform', '?type', '?value'],
6060
'memberIdentities',
6161
) +
62-
' where t."memberId" = v."memberId"::uuid and t.platform = v.platform and t.type = v.type and t.value = v.value'
62+
' where t."memberId" = v."memberId"::uuid and t.platform = v.platform and t.type = v.type and t.value = v.value and t."deletedAt" is null'
6363

6464
await this.db().none(query)
6565
}

0 commit comments

Comments
 (0)