Skip to content

Commit 42c5f4d

Browse files
authored
Add text_pattern_ops index on SecretKey.key to improve getSecrets perf (#1659)
1 parent 6f52b00 commit 42c5f4d

File tree

2 files changed

+4
-0
lines changed
  • internal-packages/database/prisma

2 files changed

+4
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
-- CreateIndex
2+
CREATE INDEX CONCURRENTLY IF NOT EXISTS "SecretStore_key_idx" ON "SecretStore"("key" text_pattern_ops);

internal-packages/database/prisma/schema.prisma

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,6 +1171,8 @@ model SecretStore {
11711171
11721172
createdAt DateTime @default(now())
11731173
updatedAt DateTime @updatedAt
1174+
1175+
@@index([key(ops: raw("text_pattern_ops"))], type: BTree)
11741176
}
11751177

11761178
model TriggerSource {

0 commit comments

Comments
 (0)