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

Suggest using numeric whodunnit column type for performance #1456

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fatkodima
Copy link

We are currently using paper_trail and have billions of items in the versions table and the table is huge.
One of the easy improvements that could have been done back then was using numeric type for whodunnit column. We currently plan to switch to integer which is 4 bytes, while using strings to store integer values can easily require much more space, like for 1000000 it will require 8 bytes (padding included), so twice the space. And also integers have statis types, which is easier for databases to work with.

So, I think it is a good idea at least to suggest people to consider switching to numeric types in the migration's comment.

  • Wrote good commit messages.
  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • Added tests.
  • Added an entry to the Changelog if the new
    code introduces user-observable changes.
  • The PR relates to only one subject with a clear title
    and description in grammatically correct, complete sentences.

Copy link

This PR has been automatically marked as stale due to inactivity.
The resources of our volunteers are limited.
If this is something you are committed to continue working on, please address any concerns raised by review and/or ping us again.
Thank you for all your contributions.

@github-actions github-actions bot added the Stale label Apr 27, 2024
@fatkodima
Copy link
Author

fatkodima commented Apr 27, 2024

Ping.

@github-actions github-actions bot removed the Stale label Apr 28, 2024
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

Successfully merging this pull request may close these issues.

None yet

1 participant