Tim Möhlmann 3af28d29d2
fix(query): optimize instance by domain query (#7513)
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.
2024-03-06 18:02:16 +00:00
..
2024-02-28 10:55:54 +02:00
2024-01-02 14:26:31 +00:00
2024-01-02 14:26:31 +00:00
2023-10-19 12:34:00 +02:00
2021-03-09 10:30:11 +01:00