Skip to content

Reduce DB / table sizes #5876

@dessalines

Description

@dessalines

Requirements

  • Is this a feature request? For questions or discussions use https://lemmy.ml/c/lemmy_support or the matrix chat.
  • Did you check to see if this issue already exists?
  • Is this only a feature request? Do not put multiple feature requests in one issue.
  • Is this a backend issue? Use the lemmy-ui repo for UI / frontend issues.
  • Do you agree to follow the rules in our Code of Conduct?

Is your proposal related to a problem?

Our 1.0 migrations increase the size of our DB by a good amount. Lets use this issue to brainstorm and strategize on how to reduce it.

#5874 will help, but there are others that we could think of.

Here's the larger table+index sizes for a lemmy.ml prod DB after 1.0 migrations are run, and after #5873 gets merged:

table_name pg_size_pretty pg_total_relation_size
post_actions 25 GB 26420830208
comment_actions 24 GB 26144899072
comment 14 GB 14712807424
post 5863 MB 6148136960
search_combined 3643 MB 3819806720
person_liked_combined 2077 MB 2177777664
person_content_combined 1732 MB 1816043520
person 1525 MB 1598619648
received_activity 1294 MB 1356996608
person_actions 836 MB 876576768
local_image 727 MB 762339328
local_user_language 505 MB 529186816
image_details 379 MB 397426688
community_actions 358 MB 375439360
sent_activity 221 MB 232005632
remote_image 177 MB 185819136
notification 168 MB 176668672
login_token 145 MB 151666688
community_language 110 MB 115015680
community 69 MB 71958528
person_saved_combined 50 MB 52240384
modlog_combined 42 MB 43548672
site_language 22 MB 22896640
post_report 19 MB 19668992
local_user 15 MB 15966208

cc @Nutomic @dullbananas

Describe the solution you'd like.

NA

Describe alternatives you've considered.

NA

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions