]> Untitled Git - lemmy.git/commit
Denormalize community_id into post_aggregates for a 1000x speed-up when loading posts...
authorSander Saarend <sander@saarend.com>
Thu, 20 Jul 2023 15:13:21 +0000 (18:13 +0300)
committerGitHub <noreply@github.com>
Thu, 20 Jul 2023 15:13:21 +0000 (11:13 -0400)
commitb511c2e6cb27b432accddc4e9aa2ec3a4bb7861b
treed95c7b72f5dfeb7722e5aee59d3ceefc79e3333b
parentced3aa5bd8bc78fb7a1a98bd839531255b773a9c
Denormalize community_id into post_aggregates for a 1000x speed-up when loading posts (#3653)

* Denormalize community_id into post_aggregates for a 1000x speed-up when loading posts

* Remove unused index

* Add creator_id to post_aggregates

* Use post_aggregates as main table for PostQuery

* Make post_aggregates the main table for PostView

* Reformat SQL
crates/db_schema/src/aggregates/structs.rs
crates/db_schema/src/schema.rs
crates/db_views/src/post_report_view.rs
crates/db_views/src/post_view.rs
migrations/2023-07-18-082614_post_aggregates_community_id/down.sql [new file with mode: 0644]
migrations/2023-07-18-082614_post_aggregates_community_id/up.sql [new file with mode: 0644]