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

Add desc indexes to optimize desc query #72

Merged
merged 1 commit into from
Apr 28, 2024
Merged

Conversation

lenguyenthanh
Copy link
Owner

@lenguyenthanh lenguyenthanh commented Apr 28, 2024

We have stress testing, therefore We could find performance issue like this.
With the tests, I noticed a significant performance dropped on some query (look at warmup tests before image), then after some search the fix is quite easy: It just needs some more indexes in our database.

With this small changes the improve in performance is staggering.
With Stress Simulation test, the at 99% tile, it is 2000% faster and 3000% time faster in mean value.

With Capacity Simulation test, the failed requests are reduce from 81% to 0%, and there is almost no different between 0 rps and 240 rps.

So, these stress tests are meaningless now, I'll increase load for these stress tests in another PR.

Screenshot of the results before and after:

Before:
Screenshot 2024-04-28 at 08 38 11

After:
Screenshot 2024-04-28 at 08 51 56

Before:
Screenshot 2024-04-28 at 08 36 58

After:
Screenshot 2024-04-28 at 08 16 00

Before:
Screenshot 2024-04-28 at 08 42 38

After:
Screenshot 2024-04-28 at 08 55 00

@lenguyenthanh lenguyenthanh merged commit e62e92f into main Apr 28, 2024
3 checks passed
@lenguyenthanh lenguyenthanh deleted the optimize-desc-query branch April 28, 2024 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant