-
Notifications
You must be signed in to change notification settings - Fork 645
Improve the performance of reverse dependencies using the default_versions
#8737
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
Conversation
611b4e8
to
d106886
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8737 +/- ##
=======================================
Coverage 88.65% 88.65%
=======================================
Files 276 276
Lines 27556 27557 +1
=======================================
+ Hits 24431 24432 +1
Misses 3125 3125 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for those that haven't followed the discussion on Zulip, could you include a summary of the performance numbers for these changes?
d106886
to
53b1493
Compare
Sure! I'll update the description to include the summary. |
53b1493
to
18a04a5
Compare
Including |
I'm surprised by this. if we add the |
In my understanding, an FYI: https://www.postgresql.org/docs/current/indexes-index-only-scans.html#INDEXES-INDEX-ONLY-SCANS |
b025480
to
5531db9
Compare
I ran these queries on the production read-replica with these results:
nice work! 😍 |
This PR is the second in a sequence of multiple PRs that improve the performance of reverse dependencies using the
default_versions
table.The following are
EXPLAIN ANALYZE
outputs for current query and proposed query.All queries run locally on my m1 MBP with pg15 installed from nixpkgs.
Current query visualization
Execution Time:
403.490 ms
EXPLAIN ANALYZE output
Proposed query with
default_versions
visualizationExecution Time:
179.527 ms
EXPLAIN ANALYZE output
The proposed query using the
default_versions
table not only improves performance but also makes the results more accurate.Here's the output of comparing results using `diff old.csv new.csv`
We discussed and experimented with the query on Zulip.