mirror of
https://github.com/zitadel/zitadel.git
synced 2025-03-01 12:27:23 +00:00

get instance by domain cannot provide an instance id because it is not known at that time. This causes a full table scan on the fields table because current indexes always include the `instance_id` column. Added a specific index for this query. If a system has many fields and there is no cache hit for the given domain this query can heaviuly influence database CPU usage, the newly added resolves this problem. (cherry picked from commit f320d18b1a24b97b67500d471c11068fd09b6c39)