Over a short period of time, this is my incoming federation activity for new comments. pg_stat_statements output being show. It is interesting to note these two INSERT statements on comments differ only in the DEFAULT value of language column. Also note the average execution times is way higher (4.3 vs. 1.28) when the language value is set, I assume due to INDEX updates on the column? Or possibly a TRIGGER?
About half of the comments coming in from other servers have default value.
WRITES are heavy, even if it is an INDEX that has to be revised. So INSERT and UPDATE statements are important to scrutinize.
I haven’t found where 1499 executions in the time period would be accounted for, but I did notice some suspect logic in the Rust code regarding edit/creation of a community: https://github.com/LemmyNet/lemmy/blob/main/crates/api_crud/src/community/update.rs#L44
This seems to not specify a site_id when loading the languages, that would return all rows in the table.