Skip to main content

Indexing and Query Patterns

Summary

Verified indexes and source-confirmed read, report, history, compatibility, and outbox access patterns.

Audience

Backend engineers, database reviewers, architects, QA, support, operations, security reviewers, and product owners.

Overview

The current snapshot contains fourteen indexes: three unique and eleven non-unique. Twelve are explicitly configured; two parent-key indexes are convention generated for child relationships.

Confirmed persistence behavior

Logical itemClassification or ownerTenant/filterIdentity or mappingRelationship or purposeIndex or behavior
ReviewCycleTenant plus statusNon-uniqueScoped lifecycle lists
AppraisalCompatibility identityUnique globalCompatibility lookup
AppraisalTenant plus statusNon-uniqueLifecycle lists
AppraisalTenant plus cycleNon-uniqueCycle reports and lists
AppraisalWorkflow identityNon-uniqueCallback correlation
GoalParent identityNon-unique conventionRelationship loading
GoalTenant plus parentNon-uniqueScoped child access
ReviewParent identityNon-unique conventionRelationship loading
ReviewTenant plus parentNon-uniqueScoped child access
AuditTenant plus occurrenceNon-uniqueNewest-first history
TimelineTenant plus occurrenceNon-uniqueNewest-first history
OutboxEvent identityUniqueOutbound deduplication
OutboxStatus plus occurrenceNon-uniqueRelay polling
Processed eventEvent identityUniqueInbound deduplication
  • Appraisal command loads include goals and reviews.
  • List queries use bounded result sets and explicit projection.
  • Reports filter by cycle and status and project directly.
  • Audit, timeline, and outbox diagnostics use no-tracking newest-first projections.
  • Compatibility loads by globally unique compatibility identity.
  • No cache, cursor pagination, full-text index, employee-cycle index, or performance guarantee is implemented.

Classification

Implemented baseline indexing with Foundation scaling controls.

Requires confirmation

Index usage measurement, pagination, cache policy, reporting isolation, hot-path thresholds, and tenant-prefixed uniqueness require confirmation.

See Also

Keywords

  • Performance persistence
  • Indexing and Query Patterns
  • Draft database documentation

Source References

  • microservices/src/performance-service/Infrastructure/PerformanceDbContext.cs
  • microservices/src/performance-service/Infrastructure/Migrations/PerformanceDbContextModelSnapshot.cs
  • microservices/src/performance-service/Application/Queries/PerformanceQueries.cs
  • microservices/src/performance-service/Application/Queries/PerformanceReports.cs
  • microservices/src/performance-service/Infrastructure/Persistence.cs

Revision Information

  • Status: Draft
  • Last reviewed: 2026-07-16
  • Review cycle: Quarterly