-
Notifications
You must be signed in to change notification settings - Fork 969
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: optimize identity related indices #4173
Conversation
@@ -956,11 +956,11 @@ func (p *IdentityPersister) ListIdentities(ctx context.Context, params identity. | |||
// important to normalize the identifier before querying the database. | |||
|
|||
joins = params.TransformStatement(` | |||
INNER JOIN identity_credentials ic ON ic.identity_id = identities.id | |||
INNER JOIN identity_credential_identifiers ici ON ici.identity_credential_id = ic.id`) | |||
INNER JOIN identity_credentials ic ON ic.identity_id = identities.id AND ic.nid = identities.nid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- This will need an update in our overrides @arekkas
...ence/sql/migrations/sql/20241023142500000001_drop_unused_indices_identity_credentials.up.sql
Outdated
Show resolved
Hide resolved
...ence/sql/migrations/sql/20241023142500000001_drop_unused_indices_identity_credentials.up.sql
Outdated
Show resolved
Hide resolved
persistence/sql/migrations/sql/20241023142500000002_drop_unused_indices_sessions.up.sql
Outdated
Show resolved
Hide resolved
.../sql/migrations/sql/20241023142500000003_drop_unused_indices_credential_identifiers.down.sql
Outdated
Show resolved
Hide resolved
This patch changes sorting to improve performance on list session endpoints. It also removes the `x-total-count` header from list responses. BREAKING CHANGE: The total count header `x-total-count` will no longer be sent in response to `GET /admin/sessions` requests. Closes ory-corp/cloud#7177
1b8c016
to
f6ece1a
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4173 +/- ##
==========================================
- Coverage 78.57% 78.56% -0.02%
==========================================
Files 379 379
Lines 27042 27033 -9
==========================================
- Hits 21249 21239 -10
+ Misses 4181 4180 -1
- Partials 1612 1614 +2 ☔ View full report in Codecov by Sentry. |
…indices (ory#4173) This patch changes sorting to improve performance on list session endpoints. It also removes the `x-total-count` header from list responses. BREAKING CHANGE: The total count header `x-total-count` will no longer be sent in response to `GET /admin/sessions` requests. Closes https://github.com/ory-corp/cloud/issues/7177 Closes https://github.com/ory-corp/cloud/issues/7175 Closes https://github.com/ory-corp/cloud/issues/7176
…indices (ory#4173) This patch changes sorting to improve performance on list session endpoints. It also removes the `x-total-count` header from list responses. BREAKING CHANGE: The total count header `x-total-count` will no longer be sent in response to `GET /admin/sessions` requests. Closes https://github.com/ory-corp/cloud/issues/7177 Closes https://github.com/ory-corp/cloud/issues/7175 Closes https://github.com/ory-corp/cloud/issues/7176
Related issue(s)
Checklist
introduces a new feature.
contributing code guidelines.
vulnerability. If this pull request addresses a security vulnerability, I
confirm that I got the approval (please contact
[email protected]) from the maintainers to push
the changes.
works.
Further Comments