lesson-history-indexes.sql 709 B

123456
  1. -- Execute outside a transaction, using a pinned connection with bounded timeouts.
  2. -- Measured against two isolated copies of production data; no source row rewrite.
  3. CREATE INDEX CONCURRENTLY IF NOT EXISTS xs_history_report_lesson ON "LessonCompletionReport"(company,"lessonId","submittedAt" DESC);
  4. CREATE INDEX CONCURRENTLY IF NOT EXISTS xs_history_report_appointment ON "LessonCompletionReport"(company,("appointmentGeneralId"::text),"submittedAt" DESC);
  5. CREATE INDEX CONCURRENTLY IF NOT EXISTS xs_history_review_student ON "MemoryPracticeRecord"(company,(yhid::text),"objectId");
  6. CREATE INDEX CONCURRENTLY IF NOT EXISTS xs_history_user_legacy ON "_User"((company::text),("legacyUserId"::text),"objectId");