-
Notifications
You must be signed in to change notification settings - Fork 251
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
GetMessagesByAddress optimisation #306
Comments
I think this is due to the fact that the CREATE INDEX message_type_index ON message (type);
CREATE INDEX message_involved_accounts_addresses ON message (involved_accounts_addresses); I have now tried creating them on the PostgreSQL database for Desmos in both the testnet and the mainnet and I've pushed them here as well with 9db8eb1. @MonikaCat can you see if you can add them to the Band and SifChain databases to see whether they improve the mentioned query performance please? |
@RiccardoM I have updated band and sifchain database with the above indexes. @ryuash Can you confirm if you can see improvement in the query performance? |
No improvements: Still timing out and coming back with 504. Tested on both frontend and console(s) |
FYI we are having the same issue. I noticed that our instance CPU was overloading and we just tried adding an extra cpu core. So far it seems to do the job! Not sure if that's considered a workaround or if actually postgres really needs some processing power. |
By the way, have you considered trying postgres partitioning feature? Do you think it's worth checking out for our case? |
we applied partitioning in staging environment and it looks promising :D |
## Description This PR updated Juno to `v3.0.0`. Closes: #282 Closes: #346 Closes: #306 --- ### Author Checklist *All items are required. Please add a note to the item if the item is not applicable and please add links to any relevant follow up issues.* I have... - [x] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] added `!` to the type prefix if API or client breaking change - [x] targeted the correct branch - [x] provided a link to the relevant issue or specification - [ ] added a changelog entry to `CHANGELOG.md` - [ ] included comments for [documenting Go code](https://blog.golang.org/godoc) - [ ] updated the relevant documentation or specification - [x] reviewed "Files changed" and left comments if necessary - [x] confirmed all CI checks have passed ### Reviewers Checklist *All items are required. Please add a note if the item is not applicable and please add your handle next to the items reviewed if you only reviewed selected items.* I have... - [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] confirmed `!` in the type prefix if API or client breaking change - [ ] confirmed all author checklist items have been addressed - [ ] reviewed API design and naming - [ ] reviewed documentation is accurate - [ ] reviewed tests and test coverage - [ ] manually tested (if applicable)
Currently when the Tx table gets too big
GetMessagesByAddress
will stop working correctly. This might be an issue with missing indexes.Below is the query i'm currently using:
Even if the limit is set to 10 the data will not return.
This is currently happening on Band and Sifchain
The text was updated successfully, but these errors were encountered: