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

SQL timeouts #619

Open
sussexrick opened this issue Jul 13, 2022 · 1 comment
Open

SQL timeouts #619

sussexrick opened this issue Jul 13, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@sussexrick
Copy link
Member

sussexrick commented Jul 13, 2022

Deleting a match with a scorecard timed out consistently, but removing the scores and then deleting the remaining match didn't. Removing the scores was slow but worked (as it usually is), and removing the match was fast.

This suggests that smaller, faster operations might be the answer to SQL timeouts and slow performance. Slow scorecard saves are likely down to updating the statistics table. Perhaps relationships should be removed from the statistics table so that records can be removed later from there, after a delete has taken place.

@sussexrick sussexrick added the bug Something isn't working label Jul 13, 2022
sussexrick added a commit that referenced this issue Aug 17, 2022
…n. The slowest part is calculating probability. Change the calculation so it can be done at read time, removing the slowest part of the save. #619
@sussexrick
Copy link
Member Author

SQL profiler showed that comfortably the slowest part of saving match scorecards was updating probability. Changed the probability calculation to remove that update entirely. Profiler now shows every part of the save at <10ms locally, yet it still feels slow in production.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant