Document Indexes and Performance Strategy #36

Closed
opened 2025-10-19 19:12:31 +00:00 by GFMpt13 · 0 comments
GFMpt13 commented 2025-10-19 19:12:31 +00:00 (Migrated from github.com)

To meet the non-functional requirement RNF03 (response time < 3s) and support real-time dashboard queries (RF10), we must define a clear indexing strategy. Indexes are critical for fast query performance in MongoDB.

This task involves reviewing all collections and identifying the fields that will be queried most often.

Tasks

  • List and justify indexes for the clients collection (e.g., nif (unique), phone, name).
  • List and justify indexes for the vehicles collection (e.g., licensePlate (unique), clientId).
  • List and justify indexes for the workOrders collection (e.g., status, vehicleId, clientId, mechanicsIds, entryDate).
  • List and justify indexes for the invoices collection (e.g., workOrderId, clientId, invoiceDate).
  • Identify any compound indexes needed for complex dashboard queries (e.g., workOrders on { status: 1, entryDate: -1 }).
  • Formally document the partial index strategy for RB02 (defined in Issue #34 ).
To meet the non-functional requirement **RNF03** (response time < 3s) and support real-time dashboard queries (**RF10**), we must define a clear indexing strategy. Indexes are critical for fast query performance in MongoDB. This task involves reviewing all collections and identifying the fields that will be queried most often. ### Tasks - [x] List and justify indexes for the `clients` collection (e.g., `nif` (unique), `phone`, `name`). - [x] List and justify indexes for the `vehicles` collection (e.g., `licensePlate` (unique), `clientId`). - [x] List and justify indexes for the `workOrders` collection (e.g., `status`, `vehicleId`, `clientId`, `mechanicsIds`, `entryDate`). - [x] List and justify indexes for the `invoices` collection (e.g., `workOrderId`, `clientId`, `invoiceDate`). - [x] Identify any compound indexes needed for complex dashboard queries (e.g., `workOrders` on `{ status: 1, entryDate: -1 }`). - [x] Formally document the partial index strategy for **RB02** (defined in Issue #34 ).
Sign in to join this conversation.
No description provided.