high cpu utilization on query ```SELECT hydra_oaut...
# talk-hydra
d
high cpu utilization on query
Copy code
SELECT hydra_oauth2_flow.acr, hydra_oauth2_flow.amr, hydra_oauth2_flow.client_id, hydra_oauth2_flow.consent_challenge_id, hydra_oauth2_flow.consent_csrf, hydra_oauth2_flow.consent_error, hydra_oauth2_flow.consent_handled_at, hydra_oauth2_flow.consent_remember, hydra_oauth2_flow.consent_remember_for, hydra_oauth2_flow.consent_skip, hydra_oauth2_flow.consent_verifier, hydra_oauth2_flow.consent_was_used, hydra_oauth2_flow.context, hydra_oauth2_flow.forced_subject_identifier, hydra_oauth2_flow.granted_at_audience, hydra_oauth2_flow.granted_scope, hydra_oauth2_flow.login_authenticated_at, hydra_oauth2_flow.login_challenge, hydra_oauth2_flow.login_csrf, hydra_oauth2_flow.login_error, hydra_oauth2_flow.login_initialized_at, hydra_oauth2_flow.login_remember, hydra_oauth2_flow.login_remember_for, hydra_oauth2_flow.login_session_id, hydra_oauth2_flow.login_skip, hydra_oauth2_flow.login_verifier, hydra_oauth2_flow.login_was_used, hydra_oauth2_flow.nid, hydra_oauth2_flow.oidc_context, hydra_oauth2_flow.request_url, hydra_oauth2_flow.requested_at, hydra_oauth2_flow.requested_at_audience, hydra_oauth2_flow.requested_scope, hydra_oauth2_flow.session_access_token, hydra_oauth2_flow.session_id_token, hydra_oauth2_flow.state, hydra_oauth2_flow.subject FROM hydra_oauth2_flow AS hydra_oauth2_flow WHERE (state = 6 OR state = 5) AND
subject = $1 AND
client_id = $2 AND
consent_skip=FALSE AND
consent_error='{}' AND
consent_remember=TRUE AND
nid = $3 ORDER BY requested_at DESC LIMIT 1
Happening on latest release of hydra
resolved by creating index on consent_error,state,subject,client_id,consent_skip,consent_remember,nid
r
@damp-fall-58740 send a pr 👍
d
ok