Skip to content

Commit 4b4554a

Browse files
committed
Added an index for "TaskRunTag"("name", "id")
It massively improves the performance of run filtering based on tags
1 parent 831d28a commit 4b4554a

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
-- CreateIndex
2+
CREATE INDEX "TaskRunTag_name_id_idx" ON "TaskRunTag"("name", "id");

packages/database/prisma/schema.prisma

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1750,6 +1750,8 @@ model TaskRunTag {
17501750
createdAt DateTime @default(now())
17511751
17521752
@@unique([projectId, name])
1753+
//Makes run filtering by tag faster
1754+
@@index([name, id])
17531755
}
17541756

17551757
model TaskRunDependency {

0 commit comments

Comments
 (0)