hanahmily opened a new issue, #12638: URL: https://github.com/apache/skywalking/issues/12638
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/skywalking/issues?q=is%3Aissue) and found no similar feature requirement. ### Description The alarm module has a feature to retrieve relevant events related to an alarm event. However, the query has the following flaws: 1. No time range: This will cause the query to scan all the segments, even though most segments might not contain the target data. 2. Repeated scanning of `start_time` and `end_time`: The alarm event generates an identical time range for all the services. Despite this, the query still scans this time range for each service, leading to unnecessary scanning. Solutions: 1. Obtain the time range from the "start_time" and "end_time" query conditions. 2. Extract the "start_time" and "end_time" from the service filter. ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a pull request to implement this on your own? - [ ] Yes I am willing to submit a pull request on my own! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- 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: notifications-unsubscr...@skywalking.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org