Fix indexes for guestbook response - #12616
Merged
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Test Results404 tests 389 ✅ 32m 50s ⏱️ Results for commit 49c61a1. ♻️ This comment has been updated with latest results. |
landreev
reviewed
Aug 14, 2026
This comment has been minimized.
This comment has been minimized.
|
landreev
approved these changes
Aug 14, 2026
This comment has been minimized.
This comment has been minimized.
Added a comment regarding Flyway usage for additional indexes to improve download count query performance.
This comment has been minimized.
This comment has been minimized.
Member
|
Reported gdcc/dataverse-jsf-tests#1 seen in this PR. |
|
|
📦 Pushed preview images as 🚢 See on GHCR. Use by referencing with full name as printed above, mind the registry name. |
Member
|
Looks good. Tests passing. |
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.


What this PR does / why we need it: Download counts were taking minutes to query from the db. These indexes help speed that up.
Which issue(s) this PR closes:
Special notes for your reviewer:
Suggestions on how to test this: Test querying the database
example query:
-c "\timing" -c "select count(*) from GuestbookResponse where dataset_id = 10293818 and eventtype != 'AccessRequest' and responsetime < '2026-08-01';"
@stevenwinship and I have tested the performance on the prod. db snapshot, and the real thing; and will be testing it some more. For the purposes of qa and merging, it should be sufficient to confirm that the indexes are created on deployment, with existing and brand-new databases. (L.A.)
Does this PR introduce a user interface change? If mockups are available, please link/include them here:
Is there a release notes update needed for this change?: included
Additional documentation: