RockteMQ-AI commented on issue #2682:
URL: 
https://github.com/apache/rocketmq-dashboard/issues/2682#issuecomment-5452929351

   **Issue Evaluation**
   
   Category: `enhancement` | Status: **Evaluated**
   
   **Feasibility:** Feasible
   **Scope:** `MybatisPlusMetricSnapshotRepository`, `NativeAlertProcessor`, 
`schema.sql`
   **Compatibility:** Additive schema change; needs migration path for existing 
databases.
   
   Good catch on the index mismatch. The current `(instance_id, metric_key, 
collected_at)` index doesn't cover the high-cardinality scope filters used in 
`findRecent` queries, leading to suboptimal query plans.
   
   Key considerations:
   - The new composite index should match the equality filters in `findRecent` 
followed by `collected_at` for range scans.
   - Must ensure the existing retention deletion (time-based) still works 
efficiently — keep the existing time index.
   - Both fresh schema and migration SQL need updating.
   - Index size impact on write throughput should be documented.
   
   This is a straightforward optimization with clear evidence.
   
   ---
   *Automated evaluation by RockteMQ-AI*


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to