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

Avoid aggregating the total items associated with a rollup when fetching elements filtered by that rollup #528

Open
PJColombo opened this issue Aug 30, 2024 · 0 comments
Labels
api 🩹 fix Minor change or improvement

Comments

@PJColombo
Copy link
Member

PJColombo commented Aug 30, 2024

When fetching multiple blobs or transactions filtered by a rollup, an additional Prisma call is made to count all rows associated with that rollup. This approach is highly inefficient, as it occurs with every request, significantly impacting performance.

We should consider updating this logic to retrieve the total number of elements associated with the rollup from the stats table, once rollup stats support is implemented.

// TODO: this is a workaround while we don't have proper rollup counts on the overall stats

@PJColombo PJColombo added 🩹 fix Minor change or improvement api labels Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api 🩹 fix Minor change or improvement
Projects
None yet
Development

No branches or pull requests

1 participant