@Gargron @renchap @thisismissem @hrefna What I'm saying is that one could make Mastodon “partitioning ready” with a few changes and let people who know what they are doing implement it if they need it.
Notices by Arcaik (arcaik@mastodon.social)
-
Embed this notice
Arcaik (arcaik@mastodon.social)'s status on Monday, 18-Sep-2023 17:05:51 JST Arcaik -
Embed this notice
Arcaik (arcaik@mastodon.social)'s status on Monday, 18-Sep-2023 16:49:53 JST Arcaik @renchap @thisismissem @hrefna @Gargron Not really. DB migrations put aside, the main thing the application has to do is to add the partition key into the where clause to ensure performances stay good.
e.g. if you partition table `toot` by `user_id`, you have to run something like `SELECT message FROM toots WHERE toot_id = foo AND user_id = bar`.
This prevents the query planner from scanning all the sub tables.