fix: index http_transactions.container_name to speed up pending page#55
Merged
tito merged 2 commits intoJun 2, 2026
Merged
Conversation
The pending page's container filter runs SELECT DISTINCT container_name across pending_requests, request_logs, and http_transactions. The first two are indexed; http_transactions was not, forcing a full scan of a BLOB-heavy table (~170k rows, the bulk of a 20 GB database). On a DB this size, GET /pending took ~10s. Adding the index drops it to sub-second (measured 11.8s -> 0.74s cold, 0.016s warm). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2ef28fb to
3abc135
Compare
tito
approved these changes
Jun 2, 2026
Contributor
|
Can you fix the CI/tests related to migration as well ? I'm happy to merge. This is not slop looking don't worry. |
The new idx_http_transactions_container migration brings the total to 15, but TestMigrations still asserted 14. Update the expected count. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
|
Thank you ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Disclaimer: PR coded by claude code, I don’t understand code and implications.
but it works on my setup.
thank you !
warning, bellow this line it’s slop (measured time are confirmed).
The pending page's container filter runs SELECT DISTINCT container_name across pending_requests, request_logs, and http_transactions. The first two are indexed; http_transactions was not, forcing a full scan of a BLOB-heavy table (~170k rows, the bulk of a 20 GB database). On a DB this size, GET /pending took ~10s. Adding the index drops it to sub-second (measured 11.8s -> 0.74s cold, 0.016s warm).