add channel__team to internal api serializer select_related (#1805)
Locally I reproduced a slow `GET /api/internal/v1/alertgroups` query (took 9s - 10s). After adding this line to the alert group serializer for the internal api it: - cut the response time in half - cut the number of executed SQL queries from 52 to 30
This commit is contained in:
parent
cef748ed4c
commit
16502205be
2 changed files with 2 additions and 0 deletions
|
|
@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
### Fixed
|
||||
|
||||
- Helm chart: Fix helm hook for db migration job
|
||||
- Performance improvements to `GET /api/internal/v1/alertgroups` endpoint by @joeyorlando and @iskhakov ([#1805](https://github.com/grafana/oncall/pull/1805))
|
||||
|
||||
## v1.2.14 (2023-04-19)
|
||||
|
||||
|
|
|
|||
|
|
@ -99,6 +99,7 @@ class AlertGroupListSerializer(EagerLoadingMixin, AlertGroupFieldsCacheSerialize
|
|||
|
||||
SELECT_RELATED = [
|
||||
"channel__organization",
|
||||
"channel__team",
|
||||
"root_alert_group",
|
||||
"resolved_by_user",
|
||||
"acknowledged_by_user",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue