This commit is contained in:
Philippe Gaultier 2025-05-21 09:16:29 +00:00 committed by GitHub
commit 2362fc59f1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View File

@ -0,0 +1 @@
DROP INDEX IF EXISTS hydra_oauth2_trusted_jwt_bearer_issuer_key_id;

View File

@ -0,0 +1,3 @@
-- `key_id` is unique-ish per row so we place it first in the index to make queries including it very fast.
-- Other fields have very few distinct values in the table so having them first in the index makes queries do a full table scan.
CREATE UNIQUE INDEX IF NOT EXISTS hydra_oauth2_trusted_jwt_bearer_issuer_key_id ON hydra_oauth2_trusted_jwt_bearer_issuer (key_id ASC, issuer ASC, subject ASC, nid ASC);