Skip to content
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

Reduce identity list amount of sub-queries #1412

Closed
aeneasr opened this issue Jun 11, 2021 · 1 comment
Closed

Reduce identity list amount of sub-queries #1412

aeneasr opened this issue Jun 11, 2021 · 1 comment
Labels
bug Something is not working.

Comments

@aeneasr
Copy link
Member

aeneasr commented Jun 11, 2021

Describe the bug

Currently, we are performing one large query (SELECT * FROM identities) and several sub-queries per identity (findVerifiableAddresses, findRecoveryAddresses, injectTraitsSchemaURL) which can be quite slow once several identities exist in the database.

Expected behavior

We should reduce the amount of queries and check if we are missing any keys to improve query performance.

Environment

  • Version: master
@aeneasr aeneasr added the bug Something is not working. label Jun 11, 2021
@aeneasr
Copy link
Member Author

aeneasr commented Jun 11, 2021

Ok, so the problem is not the queries themselves but instead that we run the sub-queries sequentially. Instead it might make sense to either do all of this in one query or alternatively run the subqueries in a parallelized fashion. See the jaeger trace:

Bildschirmaufnahme.2021-06-11.um.18.19.46.mov

aeneasr added a commit that referenced this issue Jun 14, 2021
aeneasr added a commit that referenced this issue Jun 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working.
Projects
None yet
Development

No branches or pull requests

1 participant