zitadel/internal
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
..
actions feat: support whole config as env (#6336) 2024-02-16 16:04:42 +00:00
activity fix: add https status to activity log (#6978) 2023-11-28 16:56:29 +01:00
admin/repository/eventsourcing fix(setup): init projections (#7194) 2024-01-25 17:28:20 +01:00
api feat(i18n-cs): czech translation improvements (#7511) 2024-03-06 14:53:31 +00:00
auth/repository fix(api): handle user disabling events correctly in session API (#7380) 2024-02-28 09:30:05 +00:00
auth_request/repository refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
authz fix: correctly respect maxFailureCount (#7143) 2024-01-04 15:46:25 +00:00
command fix: assign instance ID to aggregate ID when converting from v1 to v2 feature (#7505) 2024-03-05 16:12:49 +01:00
config refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
crypto fix(setup): init projections (#7194) 2024-01-25 17:28:20 +01:00
database fix: db MaxOpenConns setting (#7360) 2024-02-09 13:43:01 +01:00
domain fix: remove hard requirement of grant type auth code for device code apps + warnings for missing urls (#7429) 2024-02-29 15:28:06 +00:00
eventstore fix(ListEvents): add aggregate types to filter if not set (#7490) 2024-03-05 15:44:51 +00:00
feature feat(api): feature flags (#7356) 2024-02-28 10:55:54 +02:00
form refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
i18n refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
iam refactor: cleanup unused code (#7130) 2024-01-02 14:26:31 +00:00
id chore(Makefile): add go generate target (#6944) 2023-11-22 10:56:43 +00:00
idp fix: use configured binding on SAML IDPs and make sure CSP doesn't block POST binding (#7341) 2024-02-05 14:45:15 +00:00
integration feat: impersonation roles (#7442) 2024-02-28 10:21:11 +00:00
logstore perf: project quotas and usages (#6441) 2023-09-15 16:58:45 +02:00
migration fix(setup): init projections (#7194) 2024-01-25 17:28:20 +01:00
net perf: project quotas and usages (#6441) 2023-09-15 16:58:45 +02:00
notification fix(smtp): support UTF-8 subjects (#7432) 2024-02-22 15:11:55 +01:00
org refactor: cleanup unused code (#7130) 2024-01-02 14:26:31 +00:00
project refactor: cleanup unused code (#7130) 2024-01-02 14:26:31 +00:00
protoc merge main into next 2023-10-19 12:34:00 +02:00
qrcode docs(legal): Updated agreements and policies v2 (#3823) 2022-06-15 08:30:58 +02:00
query fix(query): optimize instance by domain query (#7513) 2024-03-06 18:02:16 +00:00
renderer refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
repository fix: assign instance ID to aggregate ID when converting from v1 to v2 feature (#7505) 2024-03-05 16:12:49 +01:00
static feat: improve instance not found error (#7413) 2024-02-28 10:49:57 +00:00
statik chore: initial version of a devcontainer (#6352) 2023-08-15 10:49:05 +02:00
telemetry refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
test feat: protos refactoring 2021-03-09 10:30:11 +01:00
user fix(auth): optimise user sessions (#7199) 2024-01-30 15:17:54 +00:00
view/repository fix: add RollbackUnlessCommitted for gorm transactions (#7197) 2024-01-10 23:02:50 +00:00
webauthn refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
zerrors refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00