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

Make entry_number queries faster #3957

Merged
merged 3 commits into from
Apr 9, 2024

Conversation

mlissner
Copy link
Member

@mlissner mlissner commented Apr 9, 2024

This creates a new conditional index on the docket_id and the entry_number so that users can filter the API to entry number 1. This appears to work well on the dev DB when the docket_entry table is well vacuumed (it wasn't at first).

This may fix #3954 if the table is properly vacuumed in prod. If not, we'll want to tweak autovacuum settings to make it better.

Finally, depending on what we learn here, we may need to tweak the way we create replicas. Maybe we run VACUUM on all of them as a last step.

@mlissner mlissner assigned ERosendo and unassigned ERosendo Apr 9, 2024
@mlissner mlissner merged commit 4a2e2ad into main Apr 9, 2024
13 checks passed
@mlissner mlissner deleted the 3954-2024-04-08-add-entry-number-index branch April 9, 2024 23:40
@mlissner
Copy link
Member Author

mlissner commented Apr 9, 2024

@blancoramiro, we've got another one for you to migrate! Same as earlier today, but easier because it simply creates an index. I think it's safe to run this on prod (manage.py migrate) and on our replica (using the SQL in the PR) and call that good enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Status: Done
Development

Successfully merging this pull request may close these issues.

Client unable to query entry number 1 in the API
2 participants