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

refactor: add composite (collection_id, deleted_at) index to nfts table #635

Merged
merged 2 commits into from
Jan 29, 2024

Conversation

crnkovic
Copy link
Contributor

@crnkovic crnkovic commented Jan 29, 2024

Summary

https://app.clickup.com/t/86drc7q7m

Prior to this change, it would take around ~500ms to execute a query to retrieve the popular collections on the /collections page if there are around 1M NFTs in the table. With this index, it's down to ~90ms. And we have much more than 1M NFTs on staging/prod, thus I can see it taking much longer in prod/staging.

It may not be an ideal query, but it's still an improvement.

Checklist

  • I checked my UI changes against the design and there are no notable differences
  • I checked my UI changes for any responsiveness issues
  • I checked my (code) changes for obvious issues, debug statements and commented code
  • I opened a corresponding card on Clickup for any remaining TODOs in my code
  • I added a short description on how to test this PR (if necessary)
  • I added a storybook entry for the component that was added (if necessary)
  • Documentation (if necessary)
  • Tests (if necessary)
  • Ready to be merged

@crnkovic crnkovic marked this pull request as ready for review January 29, 2024 12:22
@crnkovic crnkovic merged commit 1fb241b into develop Jan 29, 2024
12 checks passed
@crnkovic crnkovic deleted the refactor/add-collection-id-deleted-at-index branch January 29, 2024 13:48
@ItsANameToo ItsANameToo modified the milestones: 0.14.0, 0.13.0 Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants