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

improve coin and balance query performance #17774

Merged
merged 5 commits into from
Jun 5, 2024

Conversation

wlmyng
Copy link
Contributor

@wlmyng wlmyng commented May 16, 2024

Description

We need a dedicated index for coin_type. This can be a partial index WHERE coin_type IS NOT NULL

Test plan

Manually ran benchmark suite and verified that all benchmarked queries did not timeout and completed within a sensible amount of time.


Release notes

Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.

For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.

  • Protocol:
  • Nodes (Validators and Full nodes):
  • Indexer:
  • JSON-RPC:
  • GraphQL:
  • CLI:
  • Rust SDK:

Copy link

vercel bot commented May 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
multisig-toolkit ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 5, 2024 3:52am
sui-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 5, 2024 3:52am
sui-kiosk ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 5, 2024 3:52am
sui-typescript-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 5, 2024 3:52am

Copy link
Contributor

@stefan-mysten stefan-mysten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

… and modify necessary coin indexes to support coin queries
@wlmyng
Copy link
Contributor Author

wlmyng commented Jun 5, 2024

Okay, looks like it ultimately comes down to just an indexer db schema change.

@wlmyng wlmyng merged commit b5c096b into main Jun 5, 2024
45 checks passed
@wlmyng wlmyng deleted the wlmyng/gql/coin-perf-improvements branch June 5, 2024 16:27
wlmyng added a commit that referenced this pull request Jun 5, 2024
## Description 

We need a dedicated index for `coin_type`. This can be a partial index
`WHERE coin_type IS NOT NULL`

## Test plan 

Manually ran benchmark suite and verified that all benchmarked queries
did not timeout and completed within a sensible amount of time.

---

## Release notes

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol: 
- [ ] Nodes (Validators and Full nodes): 
- [ ] Indexer: 
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
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.

None yet

4 participants