This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
-- ============================================================
|
||||
-- MISSING INDEXES — Run in Neon SQL Editor
|
||||
-- ============================================================
|
||||
-- These indexes exist in prisma/schema.prisma but are NOT on the
|
||||
-- production database (lost during schema conflict resolution).
|
||||
-- CONCURRENTLY ensures no table locks during creation.
|
||||
-- ============================================================
|
||||
|
||||
-- SiteEvent: admin Signal Overview cross-brand queries
|
||||
-- Without this, groupBy on 30M rows scans the entire table
|
||||
CREATE INDEX CONCURRENTLY IF NOT EXISTS "SiteEvent_eventType_timestamp_idx"
|
||||
ON "SiteEvent" ("eventType", "timestamp");
|
||||
|
||||
-- Verify:
|
||||
-- SELECT indexname FROM pg_indexes WHERE tablename = 'SiteEvent';
|
||||
Reference in New Issue
Block a user