Files
ExcaliDash/backend/prisma/migrations/20260207000000_add_query_indexes/migration.sql
T
Zimeng Xiong f462b2e288 minor UI fixes
2026-02-06 21:18:10 -08:00

10 lines
413 B
SQL

-- Improve dashboard query performance for user-scoped collection and drawing listings.
CREATE INDEX IF NOT EXISTS "Collection_userId_updatedAt_idx"
ON "Collection" ("userId", "updatedAt");
CREATE INDEX IF NOT EXISTS "Drawing_userId_updatedAt_idx"
ON "Drawing" ("userId", "updatedAt");
CREATE INDEX IF NOT EXISTS "Drawing_userId_collectionId_updatedAt_idx"
ON "Drawing" ("userId", "collectionId", "updatedAt");