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

Add cronjob to reindex the database every month #18

Open
abrahammartin opened this issue Mar 3, 2019 · 0 comments
Open

Add cronjob to reindex the database every month #18

abrahammartin opened this issue Mar 3, 2019 · 0 comments

Comments

@abrahammartin
Copy link
Collaborator

jw35 said:

Postgres documentation (https://www.postgresql.org/docs/9.5/routine-reindex.html) says

"B-tree index pages that have become completely empty are reclaimed for re-use. However, there is still a possibility of inefficient use of space: if all but a few index keys on a page have been deleted, the page remains allocated. Therefore, a usage pattern in which most, but not all, keys in each range are eventually deleted will see poor use of space. For such usage patterns, periodic reindexing is recommended."

I could imagine that the churn caused by re-importing the timetable could easily provoke such poor use of space.

We should add a cronjob that executes REINDEX DATABASE tfcweb monthly.

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

No branches or pull requests

1 participant