mirror of
https://github.com/zitadel/zitadel.git
synced 2025-01-07 13:17:41 +00:00
3af28d29d2
fix(query): optimize instance by domain query On zitadel cloud we noticed an increase in database CPU usage and slightly higher response times. By analyzes we found that the instance by domain query was wrongly joining all instance_feature rows against all instances. This PR adds an additional CTE to limit the join set to only the features that apply to the found instance. The query was introduced with https://github.com/zitadel/zitadel/pull/7356 and part of the v2.47 release.