feat: add database indexes for frequent query patterns

This commit is contained in:
2026-05-16 16:57:23 +08:00
parent 6737761151
commit 3388bf42b5
5 changed files with 15 additions and 2 deletions
+2
View File
@@ -112,5 +112,7 @@ export const performanceEntries = pgTable(
index("perf_hardware_upscaler_idx").on(table.hardwareSlug, table.upscalerType),
index("perf_version_idx").on(table.versionId),
index("perf_user_idx").on(table.userId),
index("perf_removed_created_idx").on(table.isRemoved, table.createdAt.desc()),
index("perf_upvotes_idx").on(table.upvotes.desc()),
],
)