Aias00 opened a new issue, #2665:
URL: https://github.com/apache/rocketmq-dashboard/issues/2665

   ## Problem
   
   Message and trace history APIs filter by the authenticated user, optionally 
by Studio instance and query type, then sort by `gmt_create, id`. Summary 
queries repeat the same filters for counts and latest rows.
   
   The schema only has single-column time/topic/message-ID indexes, so growing 
multi-user history can require scanning and sorting unrelated rows.
   
   ## Evidence
   
   - 
`server/src/main/java/org/apache/rocketmq/studio/instance/message/QueryHistoryService.java:100`
   - 
`server/src/main/java/org/apache/rocketmq/studio/instance/message/QueryHistoryService.java:120`
   - 
`server/src/main/java/org/apache/rocketmq/studio/instance/message/QueryHistoryService.java:138`
   - `server/src/main/resources/db/schema.sql:151`
   - `server/src/main/resources/db/schema.sql:167`
   
   ## Expected behavior
   
   Add indexes matching the actual access paths, for example:
   
   - message history: `(queried_by, cluster_id, query_type, gmt_create, id)`
   - trace history: `(queried_by, cluster_id, gmt_create, id)`
   
   Validate fresh schema creation and MySQL query plans. If Flyway PR #1374 
lands first, add these in a subsequent migration.
   


-- 
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