-
Notifications
You must be signed in to change notification settings - Fork 108
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
Optimize rest account balance query #2060
Conversation
Signed-off-by: Xin Li <xin.li@hedera.com>
Codecov Report
@@ Coverage Diff @@
## master #2060 +/- ##
============================================
- Coverage 87.05% 79.46% -7.59%
- Complexity 1744 1919 +175
============================================
Files 315 377 +62
Lines 7731 9301 +1570
Branches 740 879 +139
============================================
+ Hits 6730 7391 +661
- Misses 772 1648 +876
- Partials 229 262 +33
Continue to review full report at Codecov.
|
SonarCloud Quality Gate failed. |
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.
LGTM, I like some of the cleanup you've done as well.
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.
LGTM
- rewrite the query to avoid unnecessary entity table sequential scan - add index on entity (id, type) Signed-off-by: Xin Li <xin.li@hedera.com>
Detailed description:
This PR optimizes the account balance (both hbar and token balances) db query:
Which issue(s) this PR fixes:
Fixes #2020
Special notes for your reviewer:
Performance comparison on hot data in perfnet:
Note the account has 3051 token balances.
Checklist