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

Detect Horizon DB query degradation in release candidates #5213

Open
tamirms opened this issue Feb 16, 2024 · 0 comments
Open

Detect Horizon DB query degradation in release candidates #5213

tamirms opened this issue Feb 16, 2024 · 0 comments
Labels
feature request horizon performance issues aimed at improving performance

Comments

@tamirms
Copy link
Contributor

tamirms commented Feb 16, 2024

We recently had a performance regression caused by a bug introduced in a postgres query (see #5207 for more details). In retrospect we could have caught this issue in code review if the query plan was checked before merging the PR with the problematic query. We could have also caught this issue if we thoroughly tested the claimable balances endpoint on the staging environment. It would be nice to have a way to systematically detect these DB query regressions before they get released.

One idea suggested by @MonsieurNicolas :

Maybe something like: persist the expected query plan for all queries, that way the PR diff will always include changes in query plan (even if the change comes from a table/view schema change). There is bit of a wrinkle that for this to be the most effective we'd need a good sample database state so that we would catch issues like the one you're fixing here (scans too large need to be obvious), but this may not be too much of a problem (we can create tables filled with mostly junk?).

@tamirms tamirms added horizon feature request performance issues aimed at improving performance labels Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request horizon performance issues aimed at improving performance
Projects
None yet
Development

No branches or pull requests

2 participants
@tamirms and others