feat: add index on channelId for SelectedCalendar (#27403)
Add database index on the channelId column in the SelectedCalendar table to improve lookup performance for watched calendar channels.
This commit is contained in:
+2
@@ -0,0 +1,2 @@
|
||||
-- CreateIndex
|
||||
CREATE INDEX CONCURRENTLY IF NOT EXISTS "SelectedCalendar_channelId_idx" ON "SelectedCalendar"("channelId");
|
||||
@@ -1052,6 +1052,7 @@ model SelectedCalendar {
|
||||
@@index([externalId])
|
||||
@@index([eventTypeId])
|
||||
@@index([credentialId])
|
||||
@@index([channelId])
|
||||
// Composite indices to optimize calendar-cache queries
|
||||
@@index([integration, googleChannelExpiration, error, watchAttempts, maxAttempts], name: "SelectedCalendar_watch_idx")
|
||||
@@index([integration, googleChannelExpiration, error, unwatchAttempts, maxAttempts], name: "SelectedCalendar_unwatch_idx")
|
||||
|
||||
Reference in New Issue
Block a user