-
-
Notifications
You must be signed in to change notification settings - Fork 963
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
Performance issue in log in query #2262
Comments
Thank you for the findings! Is it possible that there's an index missing? That's what it looks like to me! |
That's correct. The original query doesn't specify the desired value for |
Ok, would you be open to add the appropriate key? :) |
Yes, we are trying to fix it and then will contribute back to the community. |
Awesome, thank you so much! :) |
Preflight checklist
Describe the bug
Description
We are planning to do a load test on kratos and the first step for that is to generate 4.1million test accounts. However once those accounts are generated, we found that kratos endpoint can not serve log in request (email + password). It always shows a "time out" as the response.
Checking the query on database side, we identified one slow query:
With no cache in place, this query takes around 1min to finish.
But if we added a new condition to the where clause, the query takes 0.05 second, which makes more sense.
The
explain
output also shows the difference between these two queries, note therows
andkey_len
field in 2.row.VS
Running environment
K8s + docker + AWS RDS (Amazon Aurora compatible with mysql 5.7)
Reproducing the bug
As explained above
Relevant log output
No response
Relevant configuration
No response
Version
0.8.2
On which operating system are you observing this issue?
Linux
In which environment are you deploying?
Kubernetes
Additional Context
No response
The text was updated successfully, but these errors were encountered: